summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-08-26 12:07:55 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-08-26 12:07:55 +0200
commit2ebb354c415590dc28b07ab18b6d8f16c4f7b6aa (patch)
tree774aaccac3994f7a240191502956d7445dcc1011 /bgpd/bgp_zebra.c
parentMerge pull request #9466 from idryzhov/vrf-netns (diff)
downloadfrr-2ebb354c415590dc28b07ab18b6d8f16c4f7b6aa.tar.xz
frr-2ebb354c415590dc28b07ab18b6d8f16c4f7b6aa.zip
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>
Diffstat (limited to 'bgpd/bgp_zebra.c')
-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 739c953eb..5ef49e510 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. */
{