diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-04-26 21:13:08 +0300 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-04-29 17:05:21 +0300 | 
| commit | 1457b1d5dfe8e762487641667ee448b287e9c813 (patch) | |
| tree | b5aafd28b605c6223bd5bd28e9d1e99724fe68ee /isisd/isis_nb_config.c | |
| parent | aaf8e80994d431b66b4930d221f2743f0b57da6f (diff) | |
isisd, yang: remove vrf leaf from isis interface node
This is very confusing and incorrect. We can and should use vrf leaf of
the interface itself instead.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'isisd/isis_nb_config.c')
| -rw-r--r-- | isisd/isis_nb_config.c | 48 | 
1 files changed, 0 insertions, 48 deletions
diff --git a/isisd/isis_nb_config.c b/isisd/isis_nb_config.c index 5cad9fcfcb..58a3304629 100644 --- a/isisd/isis_nb_config.c +++ b/isisd/isis_nb_config.c @@ -2437,9 +2437,7 @@ int lib_interface_isis_create(struct nb_cb_create_args *args)  	struct isis_area *area = NULL;  	struct interface *ifp;  	struct isis_circuit *circuit = NULL; -	struct vrf *vrf;  	const char *area_tag = yang_dnode_get_string(args->dnode, "./area-tag"); -	const char *vrf_name = yang_dnode_get_string(args->dnode, "./vrf");  	uint32_t min_mtu, actual_mtu;  	switch (args->event) { @@ -2454,14 +2452,6 @@ int lib_interface_isis_create(struct nb_cb_create_args *args)  		/* zebra might not know yet about the MTU - nothing we can do */  		if (!ifp || ifp->mtu == 0)  			break; -		vrf = vrf_lookup_by_id(ifp->vrf_id); -		if (ifp->vrf_id != VRF_DEFAULT && vrf -		    && strcmp(vrf->name, vrf_name) != 0) { -			snprintf(args->errmsg, args->errmsg_len, -				 "interface %s not in vrf %s\n", ifp->name, -				 vrf_name); -			return NB_ERR_VALIDATION; -		}  		actual_mtu =  			if_is_broadcast(ifp) ? ifp->mtu - LLC_LEN : ifp->mtu; @@ -2545,44 +2535,6 @@ int lib_interface_isis_area_tag_modify(struct nb_cb_modify_args *args)  }  /* - * XPath: /frr-interface:lib/interface/frr-isisd:isis/vrf - */ -int lib_interface_isis_vrf_modify(struct nb_cb_modify_args *args) -{ -	struct interface *ifp; -	struct vrf *vrf; -	const char *ifname, *vrfname, *vrf_name; -	struct isis_circuit *circuit; - -	if (args->event == NB_EV_VALIDATE) { -		/* libyang doesn't like relative paths across module boundaries -		 */ -		ifname = yang_dnode_get_string(args->dnode->parent->parent, -					       "./name"); -		vrfname = yang_dnode_get_string(args->dnode->parent->parent, -						"./vrf"); -		vrf = vrf_lookup_by_name(vrfname); -		assert(vrf); -		ifp = if_lookup_by_name(ifname, vrf->vrf_id); - -		if (!ifp) -			return NB_OK; - -		vrf_name = yang_dnode_get_string(args->dnode, NULL); -		circuit = circuit_scan_by_ifp(ifp); -		if (circuit && circuit->area && circuit->isis -		    && strcmp(circuit->isis->name, vrf_name)) { -			snprintf(args->errmsg, args->errmsg_len, -				 "ISIS circuit is already defined on vrf  %s", -				 circuit->isis->name); -			return NB_ERR_VALIDATION; -		} -	} - -	return NB_OK; -} - -/*   * XPath: /frr-interface:lib/interface/frr-isisd:isis/circuit-type   */  int lib_interface_isis_circuit_type_modify(struct nb_cb_modify_args *args)  | 
