mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 03:27:39 +00:00
lib: remove if_lookup_by_index portion of code with unknown vrf
This function should be called with a known vrf_id. All other cases, the other API should be called. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
86f07f44c1
commit
fda8229965
12
lib/if.c
12
lib/if.c
@ -222,18 +222,6 @@ struct interface *if_lookup_by_index(ifindex_t ifindex, vrf_id_t vrf_id)
|
|||||||
struct vrf *vrf;
|
struct vrf *vrf;
|
||||||
struct interface if_tmp;
|
struct interface if_tmp;
|
||||||
|
|
||||||
if (vrf_id == VRF_UNKNOWN) {
|
|
||||||
struct interface *ifp;
|
|
||||||
|
|
||||||
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) {
|
|
||||||
ifp = if_lookup_by_index(ifindex, vrf->vrf_id);
|
|
||||||
if (ifp)
|
|
||||||
return ifp;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
vrf = vrf_lookup_by_id(vrf_id);
|
vrf = vrf_lookup_by_id(vrf_id);
|
||||||
if (!vrf)
|
if (!vrf)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user