RFC 8212 defines leak prevention for eBGP peers, but BGP-OAD defines a new
peering type One Administrative Domain (OAD), where multiple ASNs could be used
inside a single administrative domain. OAD allows sending non-transitive attributes,
so this prevention should be relaxed too.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit
3b98ddf5018cf7526b50c15018cbaf71a38fa752)
bool bgp_outbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
{
- if (peer->sort == BGP_PEER_IBGP)
+ if (peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD)
return true;
if (peer->sort == BGP_PEER_EBGP &&
bool bgp_inbound_policy_exists(struct peer *peer, struct bgp_filter *filter)
{
- if (peer->sort == BGP_PEER_IBGP)
+ if (peer->sort == BGP_PEER_IBGP || peer->sub_sort == BGP_PEER_EBGP_OAD)
return true;
if (peer->sort == BGP_PEER_EBGP