summaryrefslogtreecommitdiff
path: root/bfdd/bfd.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2020-12-04 14:37:36 +0300
committerIgor Ryzhov <iryzhov@nfware.com>2020-12-04 14:38:30 +0300
commit0a731a72ee9637d94231abe8c5ec735d94d0c554 (patch)
tree3afe0cfcf916cd306745c9c68576c4418ce9bb26 /bfdd/bfd.c
parent057edd2e84a6536615b4c80c67d83024ef8f3234 (diff)
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/bfd.c')
-rw-r--r--bfdd/bfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index f7ce0ece3e..9667ba8708 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) {