]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfd: fix session lookup 7671/head
authorIgor Ryzhov <iryzhov@nfware.com>
Fri, 4 Dec 2020 11:37:36 +0000 (14:37 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 4 Dec 2020 11:38:30 +0000 (14:38 +0300)
local-address is optional for both IPv4 and IPv6.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
bfdd/bfd.c

index f7ce0ece3ee93297f1a22a0897f3bc69e11a53a3..9667ba8708bbc74ed0c36f7a3e25bbce49519aad 100644 (file)
@@ -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) {