mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-13 14:19:44 +00:00
bgpd: prefer-global command not working on IPv4 peers
`set ipv6 next-hop prefer-global` is not working on IPv4 peers. In MP-BGP, bgp routers can advertising IPv6 routes over IPv4 peers. Remove the peer's remote address AFI type checking. Signed-off-by: shikenghua <kh_shi@edge-core.com>
This commit is contained in:
parent
90316c973f
commit
c5ca731e64
@ -2731,10 +2731,8 @@ route_set_ipv6_nexthop_prefer_global(void *rule, const struct prefix *prefix,
|
||||
path = object;
|
||||
peer = path->peer;
|
||||
|
||||
if ((CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IN)
|
||||
|| CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IMPORT))
|
||||
&& peer->su_remote
|
||||
&& sockunion_family(peer->su_remote) == AF_INET6) {
|
||||
if (CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IN)
|
||||
|| CHECK_FLAG(peer->rmap_type, PEER_RMAP_TYPE_IMPORT)) {
|
||||
/* Set next hop preference to global */
|
||||
path->attr->mp_nexthop_prefer_global = true;
|
||||
SET_FLAG(path->attr->rmap_change_flags,
|
||||
|
Loading…
Reference in New Issue
Block a user