From b1c2c70828da0fdf0619cdcb494a430f36e37172 Mon Sep 17 00:00:00 2001 From: Louis Scalbert Date: Mon, 11 Sep 2023 18:33:23 +0200 Subject: [PATCH] bgpd: fix vpn import from local vrf with no retain The BGP "no retain" VPN option avoids storing VPN prefixes that are not imported in the incoming BGP table (aka. Adj RIB in). When a VPN import policy is changed, BGP does a soft clear so that a prefix refresh is requested from the peers. However, the import from local VPN prefixes is never requested. Fix this issue by requesting a local import refresh. Fixes: a486300b26 ("bgpd: implement retain route-target all behaviour") Signed-off-by: Louis Scalbert --- bgpd/bgp_mplsvpn.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h index 62748a9e56..19b6f4eb77 100644 --- a/bgpd/bgp_mplsvpn.h +++ b/bgpd/bgp_mplsvpn.h @@ -245,8 +245,7 @@ static inline void vpn_leak_postchange(enum vpn_policy_direction direction, if (!CHECK_FLAG(bgp_vpn->af_flags[afi][SAFI_MPLS_VPN], BGP_VPNVX_RETAIN_ROUTE_TARGET_ALL)) bgp_clear_soft_in(bgp_vpn, afi, SAFI_MPLS_VPN); - else - vpn_leak_to_vrf_update_all(bgp_vrf, bgp_vpn, afi); + vpn_leak_to_vrf_update_all(bgp_vrf, bgp_vpn, afi); } if (direction == BGP_VPN_POLICY_DIR_TOVPN) { -- 2.39.5