diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2018-05-09 01:34:57 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 16:16:12 -0200 |
| commit | 8f90d89ba93a63dba121f0678ed2506b4ae530be (patch) | |
| tree | 2aacfd2bfad40dc56b567fd898d0b02a59982f66 /zebra/if_ioctl.c | |
| parent | a4bed468f9603da8199fdd828f5523c3b29ca15c (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/if_ioctl.c')
| -rw-r--r-- | zebra/if_ioctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zebra/if_ioctl.c b/zebra/if_ioctl.c index f581ebc6bd..df79d285a3 100644 --- a/zebra/if_ioctl.c +++ b/zebra/if_ioctl.c @@ -110,7 +110,7 @@ static int interface_list_ioctl(void) unsigned int size; ifreq = (struct ifreq *)((caddr_t)ifconf.ifc_req + n); - ifp = if_get_by_name(ifreq->ifr_name, VRF_DEFAULT, 0); + ifp = if_get_by_name(ifreq->ifr_name, VRF_DEFAULT); if_add_update(ifp); size = ifreq->ifr_addr.sa_len; if (size < sizeof(ifreq->ifr_addr)) @@ -120,7 +120,7 @@ static int interface_list_ioctl(void) } #else for (n = 0; n < ifconf.ifc_len; n += sizeof(struct ifreq)) { - ifp = if_get_by_name(ifreq->ifr_name, VRF_DEFAULT, 0); + ifp = if_get_by_name(ifreq->ifr_name, VRF_DEFAULT); if_add_update(ifp); ifreq++; } |
