]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: fix check for area-tag modification 7312/head
authorIgor Ryzhov <iryzhov@nfware.com>
Wed, 14 Oct 2020 20:01:49 +0000 (23:01 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Thu, 15 Oct 2020 08:19:01 +0000 (11:19 +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 d5f4c605c46e83c9509be8798e4131e445e3ee0e..24228ed70143a40987c093e3c5856acc9bd13274 100644 (file)
@@ -2075,7 +2075,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
@@ -2091,11 +2090,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)) {