]> git.puffer.fish Git - mirror/frr.git/commitdiff
BGP: Perform cleanup upon instance delete
authorvivek <vivek@cumulusnetworks.com>
Thu, 11 Feb 2016 22:45:58 +0000 (14:45 -0800)
committervivek <vivek@cumulusnetworks.com>
Fri, 12 Feb 2016 01:06:02 +0000 (17:06 -0800)
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 <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-9597
Reviewed By: CCR-4097
Testing Done: Verified failed test

bgpd/bgpd.c

index 802a8fddca18cdaceff305e1fa82572c8a34bf23..09a9f9dc93ab9dfc65f3485018196d3a381b830d 100644 (file)
@@ -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);
     }