]> git.puffer.fish Git - mirror/frr.git/commitdiff
bfdd: fix multiple links same address 7558/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 18 Nov 2020 18:47:00 +0000 (15:47 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 18 Nov 2020 19:06:16 +0000 (16:06 -0300)
Allows users with multiple links using same IPv6 address (same VRF) to
work.

Reported-by: Matti Suuronen
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bfdd/bfd.c

index cb53d96bb9c5f00c33a782211e6b495f5e51b4b2..c77b5cd1a2f98cf1b422f50aa4480c6242400dba 100644 (file)
@@ -1743,9 +1743,12 @@ struct bfd_session *bfd_key_lookup(struct bfd_key key)
 
        /* Handle case where a context more complex ctx is present.
         * input has no iface nor local-address, but a context may
-        * exist
+        * exist.
+        *
+        * Only applies to IPv4, because IPv6 requires either
+        * local-address or interface.
         */
-       if (!bs.key.mhop) {
+       if (!bs.key.mhop && bs.key.family == AF_INET) {
                ctx.result = NULL;
                ctx.given = &bs;
                hash_walk(bfd_key_hash, &bfd_key_lookup_ignore_partial_walker,