diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-30 01:33:01 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-10-30 03:17:34 +0300 | 
| commit | 8fcdc286aea3c1893fd2fabeb88bec0282b0fdab (patch) | |
| tree | 7330680b05d03fd8131a65288a3f4626ffcb80d6 /isisd/isis_cli.c | |
| parent | a1a8fb4ddd1e39252cd039244c8eca3e1d8b2bad (diff) | |
isisd: don't remove interface config when isis router is deleted
In previous releases, it was not possible to configure ISIS on an
interfaces without configuring the ISIS router first. Therefore, we had
to delete the ISIS config from all interfaces when the router config was
deleted. This is fixed since version 8.0 – interface and router configs
are completely separate and don't depend on each other, so now we can
remove this hack and preserve the interface config when the router
config is deleted.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd/isis_cli.c')
| -rw-r--r-- | isisd/isis_cli.c | 37 | 
1 files changed, 0 insertions, 37 deletions
diff --git a/isisd/isis_cli.c b/isisd/isis_cli.c index 195a3fcd2f..96ca074b86 100644 --- a/isisd/isis_cli.c +++ b/isisd/isis_cli.c @@ -70,43 +70,12 @@ DEFPY_YANG_NOSH(router_isis, router_isis_cmd,  	return ret;  } -struct if_iter { -	struct vty *vty; -	const char *tag; -}; - -static int if_iter_cb(const struct lyd_node *dnode, void *arg) -{ -	struct if_iter *iter = arg; -	const char *tag; - -	if (!yang_dnode_exists(dnode, "frr-isisd:isis/area-tag")) -		return YANG_ITER_CONTINUE; - -	tag = yang_dnode_get_string(dnode, "frr-isisd:isis/area-tag"); -	if (strmatch(tag, iter->tag)) { -		char xpath[XPATH_MAXLEN]; -		const char *name = yang_dnode_get_string(dnode, "name"); -		const char *vrf = yang_dnode_get_string(dnode, "vrf"); - -		snprintf( -			xpath, XPATH_MAXLEN, -			"/frr-interface:lib/interface[name='%s'][vrf='%s']/frr-isisd:isis", -			name, vrf); -		nb_cli_enqueue_change(iter->vty, xpath, NB_OP_DESTROY, NULL); -	} - -	return YANG_ITER_CONTINUE; -} -  DEFPY_YANG(no_router_isis, no_router_isis_cmd,  	   "no router isis WORD$tag [vrf NAME$vrf_name]",  	   NO_STR ROUTER_STR  	   "ISO IS-IS\n"  	   "ISO Routing area tag\n" VRF_CMD_HELP_STR)  { -	struct if_iter iter; -  	if (!vrf_name)  		vrf_name = VRF_DEFAULT_NAME; @@ -118,12 +87,6 @@ DEFPY_YANG(no_router_isis, no_router_isis_cmd,  		return CMD_ERR_NOTHING_TODO;  	} -	iter.vty = vty; -	iter.tag = tag; - -	yang_dnode_iterate(if_iter_cb, &iter, vty->candidate_config->dnode, -			   "/frr-interface:lib/interface[vrf='%s']", vrf_name); -  	nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);  	return nb_cli_apply_changes_clear_pending(  | 
