From: vivek Date: Thu, 11 Feb 2016 22:45:58 +0000 (-0800) Subject: BGP: Perform cleanup upon instance delete X-Git-Tag: frr-2.0-rc1~1129 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=7cb43556912a0e9610aecd51cfde5c6c74bf24e0;p=mirror%2Ffrr.git BGP: Perform cleanup upon instance delete When a BGP instance is deleted through 'no router bgp', the required cleanup was not being performed. This is after VRF-related changes. Fix to ensure this is taken care of. Note: Further changes needed in this area for VRFs. Signed-off-by: Vivek Venkatraman Reviewed-by: Donald Sharp Ticket: CM-9597 Reviewed By: CCR-4097 Testing Done: Verified failed test --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 802a8fddca..09a9f9dc93 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2994,6 +2994,11 @@ bgp_delete (struct bgp *bgp) afi_t afi; int i; + THREAD_OFF (bgp->t_startup); + + if (bgp->t_rmap_update) + BGP_TIMER_OFF(bgp->t_rmap_update); + /* Delete static route. */ bgp_static_delete (bgp); @@ -3020,6 +3025,7 @@ bgp_delete (struct bgp *bgp) if (bgp->t_rmap_def_originate_eval) { + BGP_TIMER_OFF(bgp->t_rmap_def_originate_eval); bgp_unlock(bgp); }