From d38a3cb24a40de1bb089e35a04f49b124ab9173e Mon Sep 17 00:00:00 2001 From: Emanuele Di Pascale Date: Mon, 9 Dec 2019 18:22:25 +0100 Subject: [PATCH] isisd: clean ipv4/6 circuit config on destroy when deleting an isis interface config with 'no [ip|ipv6] router isis' we are destroying the isis yang container for that interface, but the actual circuit struct is kept, and so are the flgs determining whether that circuit is configured for ipv4 and/or ipv6. This caused issues when removing and re-adding configuration, as the area counters for ip circuits were not correctly updated and the topology was never populated. Signed-off-by: Emanuele Di Pascale --- isisd/isis_nb_config.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c index 820cfaa426..d14704b4ee 100644 --- a/isisd/isis_nb_config.c +++ b/isisd/isis_nb_config.c @@ -1550,9 +1550,13 @@ int lib_interface_isis_destroy(enum nb_event event, circuit = nb_running_unset_entry(dnode); if (!circuit) return NB_ERR_INCONSISTENCY; - if (circuit->state == C_STATE_UP || circuit->state == C_STATE_CONF) - isis_csm_state_change(ISIS_DISABLE, circuit, circuit->area); + /* disable both AFs for this circuit. this will also update the + * CSM state by sending an ISIS_DISABLED signal. If there is no + * area associated to the circuit there is nothing to do + */ + if (circuit->area) + isis_circuit_af_set(circuit, false, false); return NB_OK; } -- 2.39.5