mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 23:23:35 +00:00
Merge pull request #16219 from cunningr/prevent-ipv6-link-local-injection
bgpd - Exclude case for remote prefix w/o link-local #16198
This commit is contained in:
commit
de43ca890d
@ -2472,13 +2472,16 @@ bool subgroup_announce_check(struct bgp_dest *dest, struct bgp_path_info *pi,
|
||||
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 && !transparent
|
||||
&& IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local)
|
||||
&& peer->shared_network
|
||||
&& (from == bgp->peer_self
|
||||
|| peer->sort == BGP_PEER_EBGP))) {
|
||||
PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED) &&
|
||||
IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local)) ||
|
||||
(!reflect && !transparent &&
|
||||
IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local) &&
|
||||
peer->shared_network &&
|
||||
((from == bgp->peer_self && peer->sort == BGP_PEER_EBGP) ||
|
||||
(from == bgp->peer_self && peer->sort != BGP_PEER_EBGP) ||
|
||||
(from != bgp->peer_self &&
|
||||
IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local) &&
|
||||
peer->sort == BGP_PEER_EBGP)))) {
|
||||
if (safi == SAFI_MPLS_VPN)
|
||||
attr->mp_nexthop_len =
|
||||
BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL;
|
||||
|
Loading…
Reference in New Issue
Block a user