diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2024-02-09 16:28:23 +0100 | 
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2024-02-14 16:39:51 +0100 | 
| commit | 94d12dc490d7c4109828e7d4421e7ae0d84c3448 (patch) | |
| tree | e1319cc243763d5bbf14ef631024a99cdf2360fa /bgpd/bgp_zebra.c | |
| parent | 5709e89f6c6a11154b8c89664a49d4d239b4fc8c (diff) | |
bgpd: update route leak when vrf appears
If the VRF is not yet created and a BGP instance is created for the
VRF, dependent leaked routes are inactive, which is normal. However,
when the VRF interface appears, they remains inactive.
Update route leak when a VRF interface appears. Note that routes to a
deleted VRF are already removed by zebra.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'bgpd/bgp_zebra.c')
| -rw-r--r-- | bgpd/bgp_zebra.c | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 54b792af29..0304c4383f 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -3160,6 +3160,15 @@ static int bgp_ifp_create(struct interface *ifp)  	bgp_update_interface_nbrs(bgp, ifp, ifp);  	hook_call(bgp_vrf_status_changed, bgp, ifp); + +	if (bgp_get_default() && if_is_loopback(ifp)) { +		vpn_leak_zebra_vrf_label_update(bgp, AFI_IP); +		vpn_leak_zebra_vrf_label_update(bgp, AFI_IP6); +		vpn_leak_zebra_vrf_sid_update(bgp, AFI_IP); +		vpn_leak_zebra_vrf_sid_update(bgp, AFI_IP6); +		vpn_leak_postchange_all(); +	} +  	return 0;  }  | 
