]> git.puffer.fish Git - matthieu/frr.git/commit
bgpd: fix export prefixes when rt extcomm set by route-map
authorPhilippe Guibert <philippe.guibert@6wind.com>
Thu, 28 Sep 2023 15:05:43 +0000 (17:05 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 21 Nov 2023 17:10:38 +0000 (18:10 +0100)
commite746985295ebe6b116300925677f661dd0db71cc
tree24850c0f63917c9e0e3e19118dad86515b92f3d1
parent7243e9daa42d27e6426e9d9ca5ae86ba8a0cc5f6
bgpd: fix export prefixes when rt extcomm set by route-map

When exporting BGP prefixes, it is necessary to configure
the route target extended communities with the following
command:

> rt vpn export <RouteTarget>

But the customer may need to configure the route-target to
apply to bgp updates, solely based on a route-map criterium.
by using the below route-map configured like that:

> route-map vpn export <routemapname>

Fix this by allowing to export bgp updates based on the
presence of route-targets on either route-map or vpn
configured rt. the exportation process is stopped
if no route target is available in the ecommunity list.

Fixes: ddb5b4880ba8 ("bgpd: vpn-vrf route leaking")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_ecommunity.c
bgpd/bgp_ecommunity.h
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h
bgpd/bgp_routemap.c
bgpd/bgpd.h