From dfd17258d2ad8c5e217909e3f17d52f76f6361df Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Mon, 28 Jan 2019 17:54:50 +0100 Subject: [PATCH] bgpd: detach vrf labels allocated, when removing bgp instance bgp instance is disabling the label allocated to reach vrf entity. previously, only vrf disabling was removing the label. now, when bgp leaves, bgp instance also frees the label used. PR=62306 Signed-off-by: Philippe Guibert Acked-by: Julien Floret --- bgpd/bgpd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 0b6e05fff6..d3dd587096 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3252,6 +3252,10 @@ int bgp_delete(struct bgp *bgp) /* unmap from RT list */ bgp_evpn_vrf_delete(bgp); + /* unmap bgp vrf label */ + vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP); + vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP6); + /* Stop timers. */ if (bgp->t_rmap_def_originate_eval) { BGP_TIMER_OFF(bgp->t_rmap_def_originate_eval); -- 2.39.5