summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-08-26 13:07:55 +0300
committermergify-bot <noreply@mergify.io>2021-08-26 13:42:01 +0000
commit013575f52865b8114dd047dbe7fdfdf325c7640c (patch)
treed3b6058bbb48cf708ef11d7078fc0bf885cfc5de
parent7ed45c9a1751f435357a24099ba788d58e99bdd6 (diff)
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 <iryzhov@nfware.com> (cherry picked from commit 2ebb354c415590dc28b07ab18b6d8f16c4f7b6aa)
-rw-r--r--bgpd/bgp_zebra.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 3f8dc82a44..e2171e03b7 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -837,6 +837,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. */
{