mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-24 21:30:50 +00:00
bgpd: release manual vpn label on instance deletion
When a BGP instance with a manually assigned VPN label is deleted, the label is not released from the Zebra label registry. As a result, reapplying a configuration with the same manual label leads to VPN prefix export failures. For example, with the following configuration: > router bgp 65000 vrf BLUE > address-family ipv4 unicast > label vpn export <int> Release zebra label registry on unconfiguration. Fixes:d162d5f6f5
("bgpd: fix hardset l3vpn label available in mpls pool") Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com> (cherry picked from commitd6363625c3
)
This commit is contained in:
parent
dcebe85aa6
commit
6a72facbdc
10
bgpd/bgpd.c
10
bgpd/bgpd.c
@ -4063,9 +4063,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