]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isisd.c
Merge pull request #5280 from qlyoung/doc-clean-topotest-json
[mirror_frr.git] / isisd / isisd.c
index 07be68d9aede9be778753614a220877d901375af..f15d7a9c7eccca6e42c4d9ac567ae36ba391b2ef 100644 (file)
@@ -57,6 +57,7 @@
 #include "isisd/isis_te.h"
 #include "isisd/isis_mt.h"
 #include "isisd/fabricd.h"
+#include "isisd/isis_nb.h"
 
 struct isis *isis = NULL;
 
@@ -75,12 +76,13 @@ int clear_isis_neighbor_common(struct vty *, const char *id);
 int isis_config_write(struct vty *);
 
 
-void isis_new(unsigned long process_id)
+void isis_new(unsigned long process_id, vrf_id_t vrf_id)
 {
        isis = XCALLOC(MTYPE_ISIS, sizeof(struct isis));
        /*
         * Default values
         */
+       isis->vrf_id = vrf_id;
        isis->max_area_addrs = 3;
        isis->process_id = process_id;
        isis->router_id = 0;
@@ -88,7 +90,6 @@ void isis_new(unsigned long process_id)
        isis->init_circ_list = list_new();
        isis->uptime = time(NULL);
        isis->nexthops = list_new();
-       isis->nexthops6 = list_new();
        dyn_cache_init();
        /*
         * uncomment the next line for full debugs
@@ -272,7 +273,7 @@ int isis_area_destroy(const char *area_tag)
        lsp_db_fini(&area->lspdb[1]);
 
        /* invalidate and verify to delete all routes from zebra */
-       isis_area_invalidate_routes(area, ISIS_LEVEL1 & ISIS_LEVEL2);
+       isis_area_invalidate_routes(area, area->is_type);
        isis_area_verify_routes(area);
 
        spftree_area_del(area);
@@ -738,11 +739,7 @@ DEFUN (clear_isis_neighbor_arg,
  */
 void print_debug(struct vty *vty, int flags, int onoff)
 {
-       char onoffs[4];
-       if (onoff)
-               strcpy(onoffs, "on");
-       else
-               strcpy(onoffs, "off");
+       const char *onoffs = onoff ? "on" : "off";
 
        if (flags & DEBUG_ADJ_PACKETS)
                vty_out(vty,