From: Igor Ryzhov Date: Fri, 4 Dec 2020 11:37:36 +0000 (+0300) Subject: bfd: fix session lookup X-Git-Tag: frr-7.5.1~27^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4f339b10ba950223695b7fd368f045c5387c072c;p=matthieu%2Ffrr.git bfd: fix session lookup local-address is optional for both IPv4 and IPv6. Signed-off-by: Igor Ryzhov --- diff --git a/bfdd/bfd.c b/bfdd/bfd.c index ff83c63e5a..936c72b221 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -1694,7 +1694,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) {