]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix update-source for ipv6 9498/head
authorIgor Ryzhov <iryzhov@nfware.com>
Thu, 26 Aug 2021 10:07:55 +0000 (13:07 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 26 Aug 2021 10:07:55 +0000 (13:07 +0300)
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>
bgpd/bgp_zebra.c

index 739c953ebf6dc9ca34da77606d00288c548decbd..5ef49e5108d2c1a3e2a94d8357558b2ffec80e99 100644 (file)
@@ -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. */
                {