]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix update-source for ipv6 9501/head
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 26 Aug 2021 10:07:55 +0000 (13:07 +0300)
committermergify-bot <noreply@mergify.io>
Thu, 26 Aug 2021 13:42:01 +0000 (13:42 +0000)
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)

bgpd/bgp_zebra.c

index 3f8dc82a44877b15605a07821cad2ccabfcd93a0..e2171e03b724021ab95a1c7f4a8bfc7605764c2f 100644 (file)
@@ -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. */
                {