From: Faicker Mo Date: Wed, 27 Mar 2019 10:41:57 +0000 (+0800) Subject: bgpd: Set bgp default nexthop value of IPv6 X-Git-Tag: base_7.2~242^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8f2b2139bf3c1f3dddd76cb5722afddbcf4b04e6;p=matthieu%2Ffrr.git bgpd: Set bgp default nexthop value of IPv6 Set the bgp default nexthop value of IPv6 to the local ipv6 addr of the tcp connection like IPv4. Fixed the problem of route with empty nexthop advertised to the peer when zebra is not running. * bgp_zebra.c: (bgp_zebra_nexthop_set) Set IPv6 bgp default nexthop value. Signed-off-by: Faicker Mo --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 5e9fc57f59..c0f2dfca17 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -793,6 +793,7 @@ bool bgp_zebra_nexthop_set(union sockunion *local, union sockunion *remote, peer->bgp->vrf_id); } if (local->sa.sa_family == AF_INET6) { + memcpy(&nexthop->v6_global, &local->sin6.sin6_addr, IPV6_MAX_BYTELEN); if (IN6_IS_ADDR_LINKLOCAL(&local->sin6.sin6_addr)) { if (peer->conf_if || peer->ifname) ifp = if_lookup_by_name(peer->conf_if