]> git.puffer.fish Git - matthieu/frr.git/commitdiff
isisd: keep circuit config on conf->up failure
authorEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 9 Jun 2020 16:01:25 +0000 (18:01 +0200)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Wed, 10 Jun 2020 14:34:33 +0000 (16:34 +0200)
if we are not able to bring a circuit up due to some config
issue, e.g. a low MTU compared to the area lsp-mtu, we should
not remove the configuration, as this will push out of sync
with the YANG state and create more issues down the line.
Instead, keeping the circuit state at C_STATE_CONF should be
sufficient.

For the specific case of the MTU mismatch above, this also means
that when we receive a new IF_UP_FROM_Z when the MTU is changed
we will be able to bring the circuit up as we should.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd/isis_csm.c

index 9202ed5a881d6cd18a12575cdb2246e49392fe9e..9ff5c86fb0719b77d7d9047f6f27fbe7dce0cae3 100644 (file)
@@ -141,23 +141,6 @@ isis_csm_state_change(int event, struct isis_circuit *circuit, void *arg)
                                        EC_ISIS_CONFIG,
                                        "Could not bring up %s because of invalid config.",
                                        circuit->interface->name);
-                               flog_err(
-                                       EC_ISIS_CONFIG,
-                                       "Clearing config for %s. Please re-examine it.",
-                                       circuit->interface->name);
-                               if (circuit->ip_router) {
-                                       circuit->ip_router = 0;
-                                       circuit->area->ip_circuits--;
-                               }
-                               if (circuit->ipv6_router) {
-                                       circuit->ipv6_router = 0;
-                                       circuit->area->ipv6_circuits--;
-                               }
-                               circuit_update_nlpids(circuit);
-                               isis_circuit_deconfigure(circuit,
-                                                        circuit->area);
-                               listnode_add(isis->init_circ_list, circuit);
-                               circuit->state = C_STATE_INIT;
                                break;
                        }
                        circuit->state = C_STATE_UP;