From: Donald Sharp Date: Fri, 12 Jun 2015 14:59:08 +0000 (-0700) Subject: When peering is done on link-local address, always store the local address X-Git-Tag: frr-2.0-rc1~1338 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=b2b926d5876c0742c4b4b0c3748195fde9218820;p=matthieu%2Ffrr.git When peering is done on link-local address, always store the local address in the peer structure so that it can be used in setting the link-local nexthop in updates. This would ensure that in the absence of a global IPv6 address on the peering interface, a route-map can be used to specify a potentially arbitrary global v6 nexthop and that would be sent in conjunction with the correct link-local nexthop. --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 37c65eefce..054b0916ab 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -882,12 +882,16 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote, /* If there is no global address. Set link-local address as global. I know this break RFC specification... */ + /* In this scenario, the expectation for interop is that the + * network admin would use a route-map to specify the global + * IPv6 nexthop. + */ if (!ret) memcpy (&nexthop->v6_global, &local->sin6.sin6_addr, IPV6_MAX_BYTELEN); - else - memcpy (&nexthop->v6_local, &local->sin6.sin6_addr, - IPV6_MAX_BYTELEN); + /* Always set the link-local address */ + memcpy (&nexthop->v6_local, &local->sin6.sin6_addr, + IPV6_MAX_BYTELEN); } }