]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isisd.c
Merge pull request #3325 from adeg/bugfix/bgpd-vtysh-fixes
[mirror_frr.git] / isisd / isisd.c
index 640bd69ce4536c4c14786130aea77e5756f0c43d..ce45ba65ece61f764b38513d10ad501cac77f223 100644 (file)
@@ -160,6 +160,13 @@ struct isis_area *isis_area_create(const char *area_tag)
 
        if (fabricd)
                area->fabricd = fabricd_new(area);
+
+       area->lsp_refresh_arg[0].area = area;
+       area->lsp_refresh_arg[0].level = IS_LEVEL_1;
+       area->lsp_refresh_arg[1].area = area;
+       area->lsp_refresh_arg[1].level = IS_LEVEL_2;
+
+
        QOBJ_REG(area, isis_area);
 
        return area;
@@ -226,7 +233,7 @@ int isis_area_destroy(struct vty *vty, const char *area_tag)
                        circuit->ipv6_router = 0;
                        isis_csm_state_change(ISIS_DISABLE, circuit, area);
                }
-               list_delete_and_null(&area->circuit_list);
+               list_delete(&area->circuit_list);
        }
 
        if (area->lspdb[0] != NULL) {
@@ -713,24 +720,11 @@ void print_debug(struct vty *vty, int flags, int onoff)
                vty_out(vty,
                        "IS-IS Adjacency related packets debugging is %s\n",
                        onoffs);
-       if (flags & DEBUG_CHECKSUM_ERRORS)
-               vty_out(vty, "IS-IS checksum errors debugging is %s\n", onoffs);
-       if (flags & DEBUG_LOCAL_UPDATES)
-               vty_out(vty, "IS-IS local updates debugging is %s\n", onoffs);
-       if (flags & DEBUG_PROTOCOL_ERRORS)
-               vty_out(vty, "IS-IS protocol errors debugging is %s\n", onoffs);
        if (flags & DEBUG_SNP_PACKETS)
                vty_out(vty, "IS-IS CSNP/PSNP packets debugging is %s\n",
                        onoffs);
        if (flags & DEBUG_SPF_EVENTS)
                vty_out(vty, "IS-IS SPF events debugging is %s\n", onoffs);
-       if (flags & DEBUG_SPF_STATS)
-               vty_out(vty,
-                       "IS-IS SPF Timing and Statistics Data debugging is %s\n",
-                       onoffs);
-       if (flags & DEBUG_SPF_TRIGGERS)
-               vty_out(vty, "IS-IS SPF triggering events debugging is %s\n",
-                       onoffs);
        if (flags & DEBUG_UPDATE_PACKETS)
                vty_out(vty, "IS-IS Update related packet debugging is %s\n",
                        onoffs);
@@ -746,6 +740,8 @@ void print_debug(struct vty *vty, int flags, int onoff)
                vty_out(vty, "IS-IS LSP scheduling debugging is %s\n", onoffs);
        if (flags & DEBUG_FABRICD_FLOODING)
                vty_out(vty, "OpenFabric Flooding debugging is %s\n", onoffs);
+       if (flags & DEBUG_BFD)
+               vty_out(vty, "IS-IS BFD debugging is %s\n", onoffs);
 }
 
 DEFUN_NOSH (show_debugging,
@@ -775,18 +771,6 @@ static int config_write_debug(struct vty *vty)
                vty_out(vty, "debug " PROTO_NAME " adj-packets\n");
                write++;
        }
-       if (flags & DEBUG_CHECKSUM_ERRORS) {
-               vty_out(vty, "debug " PROTO_NAME " checksum-errors\n");
-               write++;
-       }
-       if (flags & DEBUG_LOCAL_UPDATES) {
-               vty_out(vty, "debug " PROTO_NAME " local-updates\n");
-               write++;
-       }
-       if (flags & DEBUG_PROTOCOL_ERRORS) {
-               vty_out(vty, "debug " PROTO_NAME " protocol-errors\n");
-               write++;
-       }
        if (flags & DEBUG_SNP_PACKETS) {
                vty_out(vty, "debug " PROTO_NAME " snp-packets\n");
                write++;
@@ -795,14 +779,6 @@ static int config_write_debug(struct vty *vty)
                vty_out(vty, "debug " PROTO_NAME " spf-events\n");
                write++;
        }
-       if (flags & DEBUG_SPF_STATS) {
-               vty_out(vty, "debug " PROTO_NAME " spf-statistics\n");
-               write++;
-       }
-       if (flags & DEBUG_SPF_TRIGGERS) {
-               vty_out(vty, "debug " PROTO_NAME " spf-triggers\n");
-               write++;
-       }
        if (flags & DEBUG_UPDATE_PACKETS) {
                vty_out(vty, "debug " PROTO_NAME " update-packets\n");
                write++;
@@ -831,6 +807,10 @@ static int config_write_debug(struct vty *vty)
                vty_out(vty, "debug " PROTO_NAME " flooding\n");
                write++;
        }
+       if (flags & DEBUG_BFD) {
+               vty_out(vty, "debug " PROTO_NAME " bfd\n");
+               write++;
+       }
        write += spf_backoff_write_config(vty);
 
        return write;
@@ -863,87 +843,6 @@ DEFUN (no_debug_isis_adj,
        return CMD_SUCCESS;
 }
 
-DEFUN (debug_isis_csum,
-       debug_isis_csum_cmd,
-       "debug " PROTO_NAME " checksum-errors",
-       DEBUG_STR
-       PROTO_HELP
-       "IS-IS LSP checksum errors\n")
-{
-       isis->debugs |= DEBUG_CHECKSUM_ERRORS;
-       print_debug(vty, DEBUG_CHECKSUM_ERRORS, 1);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_isis_csum,
-       no_debug_isis_csum_cmd,
-       "no debug " PROTO_NAME " checksum-errors",
-       NO_STR
-       UNDEBUG_STR
-       PROTO_HELP
-       "IS-IS LSP checksum errors\n")
-{
-       isis->debugs &= ~DEBUG_CHECKSUM_ERRORS;
-       print_debug(vty, DEBUG_CHECKSUM_ERRORS, 0);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (debug_isis_lupd,
-       debug_isis_lupd_cmd,
-       "debug " PROTO_NAME " local-updates",
-       DEBUG_STR
-       PROTO_HELP
-       "IS-IS local update packets\n")
-{
-       isis->debugs |= DEBUG_LOCAL_UPDATES;
-       print_debug(vty, DEBUG_LOCAL_UPDATES, 1);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_isis_lupd,
-       no_debug_isis_lupd_cmd,
-       "no debug " PROTO_NAME " local-updates",
-       NO_STR
-       UNDEBUG_STR
-       PROTO_HELP
-       "IS-IS local update packets\n")
-{
-       isis->debugs &= ~DEBUG_LOCAL_UPDATES;
-       print_debug(vty, DEBUG_LOCAL_UPDATES, 0);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (debug_isis_err,
-       debug_isis_err_cmd,
-       "debug " PROTO_NAME " protocol-errors",
-       DEBUG_STR
-       PROTO_HELP
-       "IS-IS LSP protocol errors\n")
-{
-       isis->debugs |= DEBUG_PROTOCOL_ERRORS;
-       print_debug(vty, DEBUG_PROTOCOL_ERRORS, 1);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_isis_err,
-       no_debug_isis_err_cmd,
-       "no debug " PROTO_NAME " protocol-errors",
-       NO_STR
-       UNDEBUG_STR
-       PROTO_HELP
-       "IS-IS LSP protocol errors\n")
-{
-       isis->debugs &= ~DEBUG_PROTOCOL_ERRORS;
-       print_debug(vty, DEBUG_PROTOCOL_ERRORS, 0);
-
-       return CMD_SUCCESS;
-}
-
 DEFUN (debug_isis_snp,
        debug_isis_snp_cmd,
        "debug " PROTO_NAME " snp-packets",
@@ -1025,60 +924,6 @@ DEFUN (no_debug_isis_spfevents,
        return CMD_SUCCESS;
 }
 
-DEFUN (debug_isis_spfstats,
-       debug_isis_spfstats_cmd,
-       "debug " PROTO_NAME " spf-statistics ",
-       DEBUG_STR
-       PROTO_HELP
-       "IS-IS SPF Timing and Statistic Data\n")
-{
-       isis->debugs |= DEBUG_SPF_STATS;
-       print_debug(vty, DEBUG_SPF_STATS, 1);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_isis_spfstats,
-       no_debug_isis_spfstats_cmd,
-       "no debug " PROTO_NAME " spf-statistics",
-       NO_STR
-       UNDEBUG_STR
-       PROTO_HELP
-       "IS-IS SPF Timing and Statistic Data\n")
-{
-       isis->debugs &= ~DEBUG_SPF_STATS;
-       print_debug(vty, DEBUG_SPF_STATS, 0);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (debug_isis_spftrigg,
-       debug_isis_spftrigg_cmd,
-       "debug " PROTO_NAME " spf-triggers",
-       DEBUG_STR
-       PROTO_HELP
-       "IS-IS SPF triggering events\n")
-{
-       isis->debugs |= DEBUG_SPF_TRIGGERS;
-       print_debug(vty, DEBUG_SPF_TRIGGERS, 1);
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_debug_isis_spftrigg,
-       no_debug_isis_spftrigg_cmd,
-       "no debug " PROTO_NAME " spf-triggers",
-       NO_STR
-       UNDEBUG_STR
-       PROTO_HELP
-       "IS-IS SPF triggering events\n")
-{
-       isis->debugs &= ~DEBUG_SPF_TRIGGERS;
-       print_debug(vty, DEBUG_SPF_TRIGGERS, 0);
-
-       return CMD_SUCCESS;
-}
-
 DEFUN (debug_isis_rtevents,
        debug_isis_rtevents_cmd,
        "debug " PROTO_NAME " route-events",
@@ -1214,6 +1059,33 @@ DEFUN (no_debug_isis_lsp_sched,
        return CMD_SUCCESS;
 }
 
+DEFUN (debug_isis_bfd,
+       debug_isis_bfd_cmd,
+       "debug " PROTO_NAME " bfd",
+       DEBUG_STR
+       PROTO_HELP
+       PROTO_NAME " interaction with BFD\n")
+{
+       isis->debugs |= DEBUG_BFD;
+       print_debug(vty, DEBUG_BFD, 1);
+
+       return CMD_SUCCESS;
+}
+
+DEFUN (no_debug_isis_bfd,
+       no_debug_isis_bfd_cmd,
+       "no debug " PROTO_NAME " bfd",
+       NO_STR
+       UNDEBUG_STR
+       PROTO_HELP
+       PROTO_NAME " interaction with BFD\n")
+{
+       isis->debugs &= ~DEBUG_BFD;
+       print_debug(vty, DEBUG_BFD, 0);
+
+       return CMD_SUCCESS;
+}
+
 DEFUN (show_hostname,
        show_hostname_cmd,
        "show " PROTO_NAME " hostname",
@@ -2029,6 +1901,10 @@ int isis_config_write(struct vty *vty)
                                vty_out(vty, " lsp-mtu %u\n", area->lsp_mtu);
                                write++;
                        }
+                       if (area->purge_originator) {
+                               vty_out(vty, " purge-originator\n");
+                               write++;
+                       }
 
                        /* Minimum SPF interval. */
                        if (area->min_spf_interval[0]
@@ -2185,22 +2061,12 @@ void isis_init()
 
        install_element(ENABLE_NODE, &debug_isis_adj_cmd);
        install_element(ENABLE_NODE, &no_debug_isis_adj_cmd);
-       install_element(ENABLE_NODE, &debug_isis_csum_cmd);
-       install_element(ENABLE_NODE, &no_debug_isis_csum_cmd);
-       install_element(ENABLE_NODE, &debug_isis_lupd_cmd);
-       install_element(ENABLE_NODE, &no_debug_isis_lupd_cmd);
-       install_element(ENABLE_NODE, &debug_isis_err_cmd);
-       install_element(ENABLE_NODE, &no_debug_isis_err_cmd);
        install_element(ENABLE_NODE, &debug_isis_snp_cmd);
        install_element(ENABLE_NODE, &no_debug_isis_snp_cmd);
        install_element(ENABLE_NODE, &debug_isis_upd_cmd);
        install_element(ENABLE_NODE, &no_debug_isis_upd_cmd);
        install_element(ENABLE_NODE, &debug_isis_spfevents_cmd);
        install_element(ENABLE_NODE, &no_debug_isis_spfevents_cmd);
-       install_element(ENABLE_NODE, &debug_isis_spfstats_cmd);
-       install_element(ENABLE_NODE, &no_debug_isis_spfstats_cmd);
-       install_element(ENABLE_NODE, &debug_isis_spftrigg_cmd);
-       install_element(ENABLE_NODE, &no_debug_isis_spftrigg_cmd);
        install_element(ENABLE_NODE, &debug_isis_rtevents_cmd);
        install_element(ENABLE_NODE, &no_debug_isis_rtevents_cmd);
        install_element(ENABLE_NODE, &debug_isis_events_cmd);
@@ -2211,25 +2077,17 @@ void isis_init()
        install_element(ENABLE_NODE, &no_debug_isis_lsp_gen_cmd);
        install_element(ENABLE_NODE, &debug_isis_lsp_sched_cmd);
        install_element(ENABLE_NODE, &no_debug_isis_lsp_sched_cmd);
+       install_element(ENABLE_NODE, &debug_isis_bfd_cmd);
+       install_element(ENABLE_NODE, &no_debug_isis_bfd_cmd);
 
        install_element(CONFIG_NODE, &debug_isis_adj_cmd);
        install_element(CONFIG_NODE, &no_debug_isis_adj_cmd);
-       install_element(CONFIG_NODE, &debug_isis_csum_cmd);
-       install_element(CONFIG_NODE, &no_debug_isis_csum_cmd);
-       install_element(CONFIG_NODE, &debug_isis_lupd_cmd);
-       install_element(CONFIG_NODE, &no_debug_isis_lupd_cmd);
-       install_element(CONFIG_NODE, &debug_isis_err_cmd);
-       install_element(CONFIG_NODE, &no_debug_isis_err_cmd);
        install_element(CONFIG_NODE, &debug_isis_snp_cmd);
        install_element(CONFIG_NODE, &no_debug_isis_snp_cmd);
        install_element(CONFIG_NODE, &debug_isis_upd_cmd);
        install_element(CONFIG_NODE, &no_debug_isis_upd_cmd);
        install_element(CONFIG_NODE, &debug_isis_spfevents_cmd);
        install_element(CONFIG_NODE, &no_debug_isis_spfevents_cmd);
-       install_element(CONFIG_NODE, &debug_isis_spfstats_cmd);
-       install_element(CONFIG_NODE, &no_debug_isis_spfstats_cmd);
-       install_element(CONFIG_NODE, &debug_isis_spftrigg_cmd);
-       install_element(CONFIG_NODE, &no_debug_isis_spftrigg_cmd);
        install_element(CONFIG_NODE, &debug_isis_rtevents_cmd);
        install_element(CONFIG_NODE, &no_debug_isis_rtevents_cmd);
        install_element(CONFIG_NODE, &debug_isis_events_cmd);
@@ -2240,6 +2098,8 @@ void isis_init()
        install_element(CONFIG_NODE, &no_debug_isis_lsp_gen_cmd);
        install_element(CONFIG_NODE, &debug_isis_lsp_sched_cmd);
        install_element(CONFIG_NODE, &no_debug_isis_lsp_sched_cmd);
+       install_element(CONFIG_NODE, &debug_isis_bfd_cmd);
+       install_element(CONFIG_NODE, &no_debug_isis_bfd_cmd);
 
        install_element(CONFIG_NODE, &router_isis_cmd);
        install_element(CONFIG_NODE, &no_router_isis_cmd);