diff options
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r-- | bgpd/bgp_main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 47e7c1686..697889cc6 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -171,7 +171,7 @@ void sigusr1(void) */ static __attribute__((__noreturn__)) void bgp_exit(int status) { - struct bgp *bgp, *bgp_default; + struct bgp *bgp, *bgp_default, *bgp_evpn; struct listnode *node, *nnode; /* it only makes sense for this to be called on a clean exit */ @@ -184,13 +184,16 @@ static __attribute__((__noreturn__)) void bgp_exit(int status) bgp_close(); bgp_default = bgp_get_default(); + bgp_evpn = bgp_get_evpn(); /* reverse bgp_master_init */ for (ALL_LIST_ELEMENTS(bm->bgp, node, nnode, bgp)) { - if (bgp_default == bgp) + if (bgp_default == bgp || bgp_evpn == bgp) continue; bgp_delete(bgp); } + if (bgp_evpn && bgp_evpn != bgp_default) + bgp_delete(bgp_evpn); if (bgp_default) bgp_delete(bgp_default); |