Skip to content
Permalink
Browse files

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>
  • Loading branch information...
pguibert6WIND committed Jul 10, 2018
1 parent 86f07f4 commit fda82299656ae0c3b0fd3783c61b65eaeae0a0a2
Showing with 0 additions and 12 deletions.
  1. +0 −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 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);
if (!vrf)
return NULL;

0 comments on commit fda8229

Please sign in to comment.
You can’t perform that action at this time.