]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd: add nerd-knob to turn three-way-adj off
authorChristian Franke <chris@opensourcerouting.org>
Mon, 5 Mar 2018 20:29:15 +0000 (21:29 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Sat, 10 Mar 2018 17:38:03 +0000 (18:38 +0100)
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
isisd/isis_adjacency.c
isisd/isis_circuit.c
isisd/isis_circuit.h
isisd/isis_pdu.c
isisd/isis_vty.c

index ece080347dad513128be4a1bea1575f5b61af6d9..a6e1a55a9f52c1585013bcf98aba72be3ed1a49e 100644 (file)
@@ -169,7 +169,7 @@ void isis_adj_process_threeway(struct isis_adjacency *adj,
 {
        enum isis_threeway_state next_tw_state = ISIS_THREEWAY_DOWN;
 
-       if (tw_adj) {
+       if (tw_adj && !adj->circuit->disable_threeway_adj) {
                if (tw_adj->state == ISIS_THREEWAY_DOWN) {
                        next_tw_state = ISIS_THREEWAY_INITIALIZING;
                } else if (tw_adj->state == ISIS_THREEWAY_INITIALIZING) {
index c8642b623d637a7f0aae6e0992fb4dcd9f9f3ccd..2c443c71f702ca8f1e8648f630a5c7e2a22b3cc3 100644 (file)
@@ -1041,6 +1041,11 @@ int isis_interface_config_write(struct vty *vty)
                                write++;
                        }
 
+                       if (circuit->disable_threeway_adj) {
+                               vty_out(vty, " no isis three-way-handshake\n");
+                               write++;
+                       }
+
                        /* ISIS - Hello interval */
                        if (circuit->hello_interval[0]
                            == circuit->hello_interval[1]) {
index de6e7f2d87fd4621c3f2bb847af4db81df727908..246279c6f3dca75c49c2e85462d7a24306c2a713 100644 (file)
@@ -132,6 +132,7 @@ struct isis_circuit {
        u_int16_t upadjcount[2];
 #define ISIS_CIRCUIT_FLAPPED_AFTER_SPF 0x01
        u_char flags;
+       bool disable_threeway_adj;
        /*
         * Counters as in 10589--11.2.5.9
         */
index 8dd43258fd9dfaa768060b15a427084ae70cf789..bcbda330887bdbd133e83e5dfb8228e24f21dfde 100644 (file)
@@ -1559,7 +1559,8 @@ int send_hello(struct isis_circuit *circuit, int level)
        if (circuit->circ_type == CIRCUIT_T_BROADCAST) {
                isis_tlvs_add_lan_neighbors(
                        tlvs, circuit->u.bc.lan_neighs[level - 1]);
-       } else if (circuit->circ_type == CIRCUIT_T_P2P) {
+       } else if (circuit->circ_type == CIRCUIT_T_P2P
+                  && !circuit->disable_threeway_adj) {
                uint32_t ext_circuit_id = circuit->idx;
                if (circuit->u.p2p.neighbor) {
                        isis_tlvs_add_threeway_adj(tlvs,
index 02e28a73fe392496809610f4a1dd1c9a73e0ce14..66d79b2e9f028e2c4b1126d47f3409b707664f4f 100644 (file)
@@ -927,6 +927,21 @@ DEFUN (no_isis_hello_padding,
        return CMD_SUCCESS;
 }
 
+DEFUN (isis_threeway_adj,
+       isis_threeway_adj_cmd,
+       "[no] isis three-way-handshake",
+       NO_STR
+       "IS-IS commands\n"
+       "Enable/Disable three-way handshake\n")
+{
+       struct isis_circuit *circuit = isis_circuit_lookup(vty);
+       if (!circuit)
+               return CMD_ERR_NO_MATCH;
+
+       circuit->disable_threeway_adj = !strcmp(argv[0]->text, "no");
+       return CMD_SUCCESS;
+}
+
 DEFUN (csnp_interval,
        csnp_interval_cmd,
        "isis csnp-interval (1-600)",
@@ -2085,6 +2100,8 @@ void isis_vty_init(void)
        install_element(INTERFACE_NODE, &isis_hello_padding_cmd);
        install_element(INTERFACE_NODE, &no_isis_hello_padding_cmd);
 
+       install_element(INTERFACE_NODE, &isis_threeway_adj_cmd);
+
        install_element(INTERFACE_NODE, &csnp_interval_cmd);
        install_element(INTERFACE_NODE, &no_csnp_interval_cmd);
        install_element(INTERFACE_NODE, &csnp_interval_l1_cmd);