From: Philippe Guibert Date: Mon, 28 Jan 2019 16:54:50 +0000 (+0100) Subject: bgpd: detach vrf labels allocated, when removing bgp instance X-Git-Tag: 7.1_pulled~290^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=dfd17258d2ad8c5e217909e3f17d52f76f6361df;p=matthieu%2Ffrr.git 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 --- 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);