]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix check for area-tag modification
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 14 Oct 2020 20:01:49 +0000 (23:01 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 28 Oct 2020 18:35:48 +0000 (21:35 +0300)
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 <iryzhov@nfware.com>
isisd/isis_nb_config.c

index 170fe92c2821afbe98c341954384473f4a8c2326..f83d2343bd3ac8e2c36a2406c4fb1efef9f8284e 100644 (file)
@@ -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)) {