From 4c4faa474e13fd954bfa17653abd650945a223b5 Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Wed, 18 Nov 2020 15:47:00 -0300 Subject: bfdd: fix multiple links same address Allows users with multiple links using same IPv6 address (same VRF) to work. Reported-by: Matti Suuronen Signed-off-by: Rafael Zalamena --- bfdd/bfd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bfdd') diff --git a/bfdd/bfd.c b/bfdd/bfd.c index cb53d96bb..c77b5cd1a 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -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, -- cgit v1.2.3