summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2018-05-09 01:34:57 -0300
committerRenato Westphal <renato@opensourcerouting.org>2018-10-27 16:16:12 -0200
commit8f90d89ba93a63dba121f0678ed2506b4ae530be (patch)
tree2aacfd2bfad40dc56b567fd898d0b02a59982f66 /zebra/kernel_socket.c
parenta4bed468f9603da8199fdd828f5523c3b29ca15c (diff)
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 <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c2
1 files changed, 1 insertions, 1 deletions
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);