mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 11:19:13 +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) {
|
if (NEXTHOP_IS_V6) {
|
||||||
attr->mp_nexthop_len = BGP_ATTR_NHLEN_IPV6_GLOBAL;
|
attr->mp_nexthop_len = BGP_ATTR_NHLEN_IPV6_GLOBAL;
|
||||||
if ((CHECK_FLAG(peer->af_flags[afi][safi],
|
if ((CHECK_FLAG(peer->af_flags[afi][safi],
|
||||||
PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED)
|
PEER_FLAG_NEXTHOP_LOCAL_UNCHANGED) &&
|
||||||
&& IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local))
|
IN6_IS_ADDR_LINKLOCAL(&attr->mp_nexthop_local)) ||
|
||||||
|| (!reflect && !transparent
|
(!reflect && !transparent &&
|
||||||
&& IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local)
|
IN6_IS_ADDR_LINKLOCAL(&peer->nexthop.v6_local) &&
|
||||||
&& peer->shared_network
|
peer->shared_network &&
|
||||||
&& (from == bgp->peer_self
|
((from == bgp->peer_self && peer->sort == BGP_PEER_EBGP) ||
|
||||||
|| 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)
|
if (safi == SAFI_MPLS_VPN)
|
||||||
attr->mp_nexthop_len =
|
attr->mp_nexthop_len =
|
||||||
BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL;
|
BGP_ATTR_NHLEN_VPNV6_GLOBAL_AND_LL;
|
||||||
|
Loading…
Reference in New Issue
Block a user