diff options
author | Katerina Kubecova <katerina.kubecova@nic.cz> | 2024-01-18 12:36:48 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2024-03-04 23:35:10 +0100 |
commit | a48dc5efe05f4e985b648f19679865153d0398bd (patch) | |
tree | 66976a310c69e8bb5e0cea46fbee2be536d64373 /proto/bfd/bfd.c | |
parent | 37bf2078434b5de5662d28345bce788624d50ac7 (diff) |
BFD: Show session for ip / ip prefix
Diffstat (limited to 'proto/bfd/bfd.c')
-rw-r--r-- | proto/bfd/bfd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/proto/bfd/bfd.c b/proto/bfd/bfd.c index 080ce909..61ceea50 100644 --- a/proto/bfd/bfd.c +++ b/proto/bfd/bfd.c @@ -1192,7 +1192,7 @@ void bfd_show_details(struct bfd_session *s) } void -bfd_show_sessions(struct proto *P, int details) +bfd_show_sessions(struct proto *P, int details, net_addr addr) { byte tbuf[TM_DATETIME_BUFFER_SIZE]; struct bfd_proto *p = (struct bfd_proto *) P; @@ -1215,6 +1215,9 @@ bfd_show_sessions(struct proto *P, int details) HASH_WALK(p->session_hash_id, next_id, s) { /* FIXME: this is thread-unsafe, but perhaps harmless */ + + if (addr.type != 0 && !ipa_in_netX(s->addr, &addr)) + continue; if (!details) { state = s->loc_state; |