mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-16 06:29:34 +00:00
Merge pull request #18121 from louis-6wind/fix-lable-release
bgpd: release manual vpn label on instance deletion
This commit is contained in:
commit
cadfc56c89
10
bgpd/bgpd.c
10
bgpd/bgpd.c
@ -4071,9 +4071,19 @@ int bgp_delete(struct bgp *bgp)
|
||||
vpn_leak_zebra_vrf_sid_withdraw(bgp, afi);
|
||||
}
|
||||
|
||||
/* release auto vpn labels */
|
||||
bgp_vpn_release_label(bgp, AFI_IP, true);
|
||||
bgp_vpn_release_label(bgp, AFI_IP6, true);
|
||||
|
||||
/* release manual vpn labels */
|
||||
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
|
||||
if (!CHECK_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_LABEL_MANUAL_REG))
|
||||
continue;
|
||||
bgp_zebra_release_label_range(bgp->vpn_policy[afi].tovpn_label,
|
||||
bgp->vpn_policy[afi].tovpn_label);
|
||||
UNSET_FLAG(bgp->vpn_policy[afi].flags, BGP_VPN_POLICY_TOVPN_LABEL_MANUAL_REG);
|
||||
}
|
||||
|
||||
hook_call(bgp_inst_delete, bgp);
|
||||
|
||||
FOREACH_AFI_SAFI (afi, safi)
|
||||
|
Loading…
Reference in New Issue
Block a user