summaryrefslogtreecommitdiffstats
path: root/isisd/isis_northbound.c
diff options
context:
space:
mode:
authorEmanuele Di Pascale <emanuele@voltanet.io>2019-09-02 17:06:57 +0200
committerEmanuele Di Pascale <emanuele@voltanet.io>2019-09-02 17:12:05 +0200
commit5991e935787d906fe5e55fbfe4834efa681026bd (patch)
tree94aced04da053b69ccb49d1c8bae1cc60d05bc74 /isisd/isis_northbound.c
parentMerge pull request #4910 from sworleys/Docker-Update-Libyang (diff)
downloadfrr-5991e935787d906fe5e55fbfe4834efa681026bd.tar.xz
frr-5991e935787d906fe5e55fbfe4834efa681026bd.zip
isisd: fix northbound circuit deletion
circuit deletion was being enforced by sending a fake IF_DOWN_FROM_Z event for the circuit interface. This created a problem when the circuit was enabled again, since isisd internal state machine was expecting to see an IF_UP_FROM_Z that never came, as the interface had not actually gone down. As a consequence, disabling + re-enabling isis on an interface or area would leave interfaces in a CONFIG state, and adjacencies were not restored. Fix this by following the state machine and simply disabling circuits rather than attempting to delete them forcefully. Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Diffstat (limited to 'isisd/isis_northbound.c')
-rw-r--r--isisd/isis_northbound.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/isisd/isis_northbound.c b/isisd/isis_northbound.c
index 0982a468a..25c7058f3 100644
--- a/isisd/isis_northbound.c
+++ b/isisd/isis_northbound.c
@@ -1561,21 +1561,8 @@ static int lib_interface_isis_destroy(enum nb_event event,
circuit = nb_running_unset_entry(dnode);
if (!circuit)
return NB_ERR_INCONSISTENCY;
- /* delete circuit through csm changes */
- switch (circuit->state) {
- case C_STATE_UP:
- isis_csm_state_change(IF_DOWN_FROM_Z, circuit,
- circuit->interface);
+ if (circuit->state == C_STATE_UP || circuit->state == C_STATE_CONF)
isis_csm_state_change(ISIS_DISABLE, circuit, circuit->area);
- break;
- case C_STATE_CONF:
- isis_csm_state_change(ISIS_DISABLE, circuit, circuit->area);
- break;
- case C_STATE_INIT:
- isis_csm_state_change(IF_DOWN_FROM_Z, circuit,
- circuit->interface);
- break;
- }
return NB_OK;
}