From 2ebb354c415590dc28b07ab18b6d8f16c4f7b6aa Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Thu, 26 Aug 2021 13:07:55 +0300 Subject: [PATCH] bgpd: fix update-source for ipv6 There's no IPv6 LL address on loopback/vrf interfaces. So if the user configures update-source, the session is never going to be established. Signed-off-by: Igor Ryzhov --- bgpd/bgp_zebra.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 739c953ebf..5ef49e5108 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -838,6 +838,12 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote, if (direct) v6_ll_avail = if_get_ipv6_local( ifp, &nexthop->v6_local); + /* + * It's fine to not have a v6 LL when using + * update-source loopback/vrf + */ + if (!v6_ll_avail && if_is_loopback_or_vrf(ifp)) + v6_ll_avail = true; } else /* Link-local address. */ { -- 2.39.5