diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-10-29 14:37:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 14:37:04 +0100 |
commit | 50f450bd53792d79b33ac1c9803c5d4a84ec7889 (patch) | |
tree | 4f2067909d04c91e4536b57943d2b019ea75e759 | |
parent | Merge pull request #5242 from FRRouting/feature/topotests-docker-libyang-from... (diff) | |
parent | bgpd: Do not send next-hop as :: in MP_REACH_NLRI if no link-local exists (diff) | |
download | frr-50f450bd53792d79b33ac1c9803c5d4a84ec7889.tar.xz frr-50f450bd53792d79b33ac1c9803c5d4a84ec7889.zip |
Merge pull request #4941 from ton31337/fix/do_not_include_nexthop_dash_dash
bgpd: Do not send next-hop as :: in MP_REACH_NLRI if no link-local ex…
Diffstat (limited to '')
-rw-r--r-- | bgpd/bgp_route.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index af73a3afc..77428bbb0 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -1751,18 +1751,22 @@ int subgroup_announce_check(struct bgp_node *rn, struct bgp_path_info *pi, * if * the peer (group) is configured to receive link-local nexthop * unchanged - * and it is available in the prefix OR we're not reflecting the route - * and + * and it is available in the prefix OR we're not reflecting the route, + * link-local nexthop address is valid and * the peer (group) to whom we're going to announce is on a shared * network * and this is either a self-originated route or the peer is EBGP. + * By checking if nexthop LL address is valid we are sure that + * we do not announce LL address as `::`. */ if (NEXTHOP_IS_V6) { attr->mp_nexthop_len = BGP_ATTR_NHLEN_IPV6_GLOBAL; if ((CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED) && IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local)) - || (!reflect && peer->shared_network + || (!reflect + && IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local) + && peer->shared_network && (from == bgp->peer_self || peer->sort == BGP_PEER_EBGP))) { attr->mp_nexthop_len = |