summaryrefslogtreecommitdiffstats
path: root/bfdd
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2020-12-04 12:37:36 +0100
committerIgor Ryzhov <iryzhov@nfware.com>2020-12-04 12:38:30 +0100
commit0a731a72ee9637d94231abe8c5ec735d94d0c554 (patch)
tree3afe0cfcf916cd306745c9c68576c4418ce9bb26 /bfdd
parentMerge pull request #7663 from donaldsharp/vtysh_history_display (diff)
downloadfrr-0a731a72ee9637d94231abe8c5ec735d94d0c554.tar.xz
frr-0a731a72ee9637d94231abe8c5ec735d94d0c554.zip
bfd: fix session lookup
local-address is optional for both IPv4 and IPv6. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bfdd')
-rw-r--r--bfdd/bfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index f7ce0ece3..9667ba870 100644
--- a/bfdd/bfd.c
+++ b/bfdd/bfd.c
@@ -1731,7 +1731,7 @@ struct bfd_session *bfd_key_lookup(struct bfd_key key)
inet_ntop(bs.key.family, &bs.key.peer, peer_buf,
sizeof(peer_buf));
/* Handle cases where local-address is optional. */
- if (bs.key.family == AF_INET) {
+ if (memcmp(&bs.key.local, &zero_addr, sizeof(bs.key.local))) {
memset(&bs.key.local, 0, sizeof(bs.key.local));
bsp = hash_lookup(bfd_key_hash, &bs);
if (bsp) {