Merge pull request #2870 from AnuradhaKaruppiah/bgp-default-del

bgpd: unregister VNI learning from zebra on default instance delete
This commit is contained in:
Russ White 2018-08-24 20:19:17 -04:00 committed by GitHub
commit a86b18d82f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3187,15 +3187,16 @@ int bgp_delete(struct bgp *bgp)
.import_redirect_rtlist);
bgp->vpn_policy[afi].import_redirect_rtlist = NULL;
}
/* Remove visibility via the master list - there may however still be
* routes to be processed still referencing the struct bgp.
*/
listnode_delete(bm->bgp, bgp);
/* Deregister from Zebra, if needed */
if (IS_BGP_INST_KNOWN_TO_ZEBRA(bgp))
bgp_zebra_instance_deregister(bgp);
/* Remove visibility via the master list - there may however still be
* routes to be processed still referencing the struct bgp.
*/
listnode_delete(bm->bgp, bgp);
/* Free interfaces in this instance. */
bgp_if_finish(bgp);