From 057f568a34bc2682983d89efcdf20a431374daeb Mon Sep 17 00:00:00 2001 From: Igor Ryzhov Date: Wed, 14 Oct 2020 23:01:49 +0300 Subject: [PATCH] isisd: fix check for area-tag modification Interface area-tag is not supposed to be modified once defined, but the necessary check is currently broken, because the circuit is never in init_circ_list if the area-tag is already configured for the interface. Signed-off-by: Igor Ryzhov --- isisd/isis_nb_config.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c index 170fe92c28..f83d2343bd 100644 --- a/isisd/isis_nb_config.c +++ b/isisd/isis_nb_config.c @@ -1933,7 +1933,6 @@ int lib_interface_isis_area_tag_modify(struct nb_cb_modify_args *args) struct interface *ifp; struct vrf *vrf; const char *area_tag, *ifname, *vrfname; - struct isis *isis = NULL; if (args->event == NB_EV_VALIDATE) { /* libyang doesn't like relative paths across module boundaries @@ -1949,11 +1948,7 @@ int lib_interface_isis_area_tag_modify(struct nb_cb_modify_args *args) if (!ifp) return NB_OK; - isis = isis_lookup_by_vrfid(ifp->vrf_id); - if (isis == NULL) - return NB_ERR_VALIDATION; - - circuit = circuit_lookup_by_ifp(ifp, isis->init_circ_list); + circuit = circuit_scan_by_ifp(ifp); area_tag = yang_dnode_get_string(args->dnode, NULL); if (circuit && circuit->area && circuit->area->area_tag && strcmp(circuit->area->area_tag, area_tag)) { -- 2.39.5