]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfd: fix session lookup 7672/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:42:20 +0000 (14:42 +0300)
local-address is optional for both IPv4 and IPv6.

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

index ff83c63e5aca87244cfda8237597459909296965..936c72b22165b84ba7292181d495a422aa29542f 100644 (file)
@@ -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) {