mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 20:15:08 +00:00
bgpd: Pass non-transitive ext-communities between Route Server and RS clients
https://datatracker.ietf.org/doc/html/rfc7947#section-2.2 Optional recognized and unrecognized BGP attributes, whether transitive or non-transitive, SHOULD NOT be updated by the route server (unless enforced by local IXP operator configuration) and SHOULD be passed on to other route server clients. By default LB ext-community works with iBGP peers. When we receive a route from eBGP peer, we can send LB ext-community to iBGP peers. With this patch, allow sending LB ext-community to iBGP/eBGP peers if they are set as RS clients. FRR does not send non-transitive ext-communities to eBGP peers, but for example GoBGP sends and if it's set as RS client, we should pass those attributes towards another RS client. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
bd751c0700
commit
b17d5444f4
@ -4177,9 +4177,14 @@ bgp_size_t bgp_packet_attribute(struct bgp *bgp, struct peer *peer,
|
|||||||
if (CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY)
|
if (CHECK_FLAG(peer->af_flags[afi][safi], PEER_FLAG_SEND_EXT_COMMUNITY)
|
||||||
&& (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES))) {
|
&& (attr->flag & ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES))) {
|
||||||
struct ecommunity *ecomm = bgp_attr_get_ecommunity(attr);
|
struct ecommunity *ecomm = bgp_attr_get_ecommunity(attr);
|
||||||
|
bool transparent = CHECK_FLAG(peer->af_flags[afi][safi],
|
||||||
|
PEER_FLAG_RSERVER_CLIENT) &&
|
||||||
|
from &&
|
||||||
|
CHECK_FLAG(from->af_flags[afi][safi],
|
||||||
|
PEER_FLAG_RSERVER_CLIENT);
|
||||||
|
|
||||||
if (peer->sort == BGP_PEER_IBGP
|
if (peer->sort == BGP_PEER_IBGP ||
|
||||||
|| peer->sort == BGP_PEER_CONFED) {
|
peer->sort == BGP_PEER_CONFED || transparent) {
|
||||||
if (ecomm->size * 8 > 255) {
|
if (ecomm->size * 8 > 255) {
|
||||||
stream_putc(s,
|
stream_putc(s,
|
||||||
BGP_ATTR_FLAG_OPTIONAL
|
BGP_ATTR_FLAG_OPTIONAL
|
||||||
|
Loading…
Reference in New Issue
Block a user