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 <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-9597
Reviewed By: CCR-4097
Testing Done: Verified failed test
This commit is contained in:
vivek 2016-02-11 14:45:58 -08:00
parent ad695d6e8d
commit 7cb4355691

View 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);
}