From 0a731a72ee9637d94231abe8c5ec735d94d0c554 Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Fri, 4 Dec 2020 14:37:36 +0300 Subject: bfd: fix session lookup local-address is optional for both IPv4 and IPv6. Signed-off-by: Igor Ryzhov --- bfdd/bfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bfdd/bfd.c') 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) { -- cgit v1.2.3