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 --- zebra/kernel_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zebra/kernel_socket.c') diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 9c3d9adefb..d0eb2f4b3b 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -326,7 +326,7 @@ static int ifan_read(struct if_announcemsghdr *ifan) __func__, ifan->ifan_index, ifan->ifan_name); /* Create Interface */ - ifp = if_get_by_name(ifan->ifan_name, VRF_DEFAULT, 0); + ifp = if_get_by_name(ifan->ifan_name, VRF_DEFAULT); if_set_index(ifp, ifan->ifan_index); if_get_metric(ifp); -- cgit v1.2.3