--- embedaddon/quagga/ospf6d/ospf6_main.c 2013/07/21 23:54:39 1.1.1.3 +++ embedaddon/quagga/ospf6d/ospf6_main.c 2016/11/02 10:09:11 1.1.1.4 @@ -35,12 +35,15 @@ #include "privs.h" #include "sigevent.h" #include "zclient.h" +#include "vrf.h" #include "ospf6d.h" #include "ospf6_top.h" #include "ospf6_message.h" #include "ospf6_asbr.h" #include "ospf6_lsa.h" +#include "ospf6_interface.h" +#include "ospf6_zebra.h" /* Default configuration file name for ospf6d. */ #define OSPF6_DEFAULT_CONFIG "ospf6d.conf" @@ -125,7 +128,7 @@ Daemon which manages OSPF version 3.\n\n\ -C, --dryrun Check configuration for validity and exit\n\ -h, --help Display this help and exit\n\ \n\ -Report bugs to zebra@zebra.org\n", progname); +Report bugs to %s\n", progname, ZEBRA_BUG_ADDRESS); } exit (status); @@ -134,17 +137,21 @@ Report bugs to zebra@zebra.org\n", progname); static void __attribute__ ((noreturn)) ospf6_exit (int status) { - extern struct ospf6 *ospf6; - extern struct zclient *zclient; + struct listnode *node; + struct interface *ifp; if (ospf6) ospf6_delete (ospf6); + for (ALL_LIST_ELEMENTS_RO(iflist, node, ifp)) + if (ifp->info != NULL) + ospf6_interface_delete(ifp->info); + ospf6_message_terminate (); ospf6_asbr_terminate (); ospf6_lsa_terminate (); - if_terminate (); + vrf_terminate (); vty_terminate (); cmd_terminate (); @@ -312,15 +319,12 @@ main (int argc, char *argv[], char *envp[]) cmd_init (1); vty_init (master); memory_init (); - if_init (); + vrf_init (); access_list_init (); prefix_list_init (); /* initialize ospf6 */ ospf6_init (); - - /* sort command vector */ - sort_node (); /* parse config file */ vty_read_config (config_file, config_default);