mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 20:32:18 +00:00
bgpd: Do not apply eBGP policy for iBGP peers
Treat iBGP peers as they have a policy applied. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
parent
d8ffe9761d
commit
e0df4c04a0
@ -4357,6 +4357,9 @@ void bgp_clear_stale_route(struct peer *peer, afi_t afi, safi_t safi)
|
||||
|
||||
int bgp_outbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
|
||||
{
|
||||
if (peer->sort == BGP_PEER_IBGP)
|
||||
return 1;
|
||||
|
||||
if (peer->sort == BGP_PEER_EBGP
|
||||
&& (ROUTE_MAP_OUT_NAME(filter) || PREFIX_LIST_OUT_NAME(filter)
|
||||
|| FILTER_LIST_OUT_NAME(filter)
|
||||
@ -4367,6 +4370,9 @@ int bgp_outbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
|
||||
|
||||
int bgp_inbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
|
||||
{
|
||||
if (peer->sort == BGP_PEER_IBGP)
|
||||
return 1;
|
||||
|
||||
if (peer->sort == BGP_PEER_EBGP
|
||||
&& (ROUTE_MAP_IN_NAME(filter) || PREFIX_LIST_IN_NAME(filter)
|
||||
|| FILTER_LIST_IN_NAME(filter)
|
||||
|
Loading…
Reference in New Issue
Block a user