From 8f90d89ba93a63dba121f0678ed2506b4ae530be Mon Sep 17 00:00:00 2001 From: Renato Westphal Date: Wed, 9 May 2018 01:34:57 -0300 Subject: lib: retrofit interface commands to the new northbound model The frr-interface YANG module models interfaces using a YANG list keyed by the interface name and the interface VRF. Interfaces can't be keyed only by their name since interface names might not be globally unique when the netns VRF backend is in use. When using the VRF-Lite backend, however, interface names *must* be globally unique. In this case, we need to validate the uniqueness of interface names inside the appropriate northbound callback since this constraint can't be expressed in the YANG language. We must also ensure that only inactive interfaces can be removed, among other things we need to validate in the northbound layer. Signed-off-by: Renato Westphal --- ospf6d/ospf6_top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ospf6d') diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c index 901a35ccf..40c612381 100644 --- a/ospf6d/ospf6_top.c +++ b/ospf6d/ospf6_top.c @@ -656,7 +656,7 @@ DEFUN (ospf6_interface_area, uint32_t area_id; /* find/create ospf6 interface */ - ifp = if_get_by_name(argv[idx_ifname]->arg, VRF_DEFAULT, 0); + ifp = if_get_by_name(argv[idx_ifname]->arg, VRF_DEFAULT); oi = (struct ospf6_interface *)ifp->info; if (oi == NULL) oi = ospf6_interface_create(ifp); -- cgit v1.2.3