diff options
author | Tuetuopay <tuetuopay@me.com> | 2019-03-06 19:09:25 +0100 |
---|---|---|
committer | Tuetuopay <tuetuopay@me.com> | 2019-03-19 11:56:14 +0100 |
commit | e2f3a930c54c13c3174d6641fe4e6ee159966bd1 (patch) | |
tree | bdfc8e5bff81c5ba50c6b83cf37a6e434553bf65 /bgpd/bgp_main.c | |
parent | Merge pull request #3855 from donaldsharp/bgp_clist_sa (diff) | |
download | frr-e2f3a930c54c13c3174d6641fe4e6ee159966bd1.tar.xz frr-e2f3a930c54c13c3174d6641fe4e6ee159966bd1.zip |
bgpd: Allow non-default instance to be EVPN one
This makes the instance bearing the advertise-all-vni config option
register to zebra as the EVPN one, forwarding it the option.
Signed-off-by: Tuetuopay <tuetuopay@me.com>
Sponsored-by: Scaleway
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); |