diff options
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r-- | bgpd/bgp_main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c index 5026b5ea..ad4de798 100644 --- a/bgpd/bgp_main.c +++ b/bgpd/bgp_main.c @@ -36,6 +36,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "filter.h" #include "plist.h" #include "stream.h" +#include "vrf.h" #include "bgpd/bgpd.h" #include "bgpd/bgp_attr.h" @@ -248,17 +249,14 @@ bgp_exit (int status) /* reverse bgp_zebra_init/if_init */ if (retain_mode) if_add_hook (IF_DELETE_HOOK, NULL); - for (ALL_LIST_ELEMENTS (iflist, node, nnode, ifp)) + for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) { struct listnode *c_node, *c_nnode; struct connected *c; for (ALL_LIST_ELEMENTS (ifp->connected, c_node, c_nnode, c)) bgp_connected_delete (c); - - if_delete (ifp); } - list_free (iflist); /* reverse bgp_attr_init */ bgp_attr_finish (); @@ -293,6 +291,7 @@ bgp_exit (int status) /* reverse community_list_init */ community_list_terminate (bgp_clist); + vrf_terminate (); cmd_terminate (); vty_terminate (); if (zclient) @@ -427,6 +426,7 @@ main (int argc, char **argv) cmd_init (1); vty_init (master); memory_init (); + vrf_init (); /* BGP related initialization. */ bgp_init (); |