]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: remove if_lookup_by_index portion of code with unknown vrf
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 10 Jul 2018 12:34:44 +0000 (14:34 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 10 Jul 2018 15:32:40 +0000 (17:32 +0200)
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>
lib/if.c

index 2541e6e45affd5893f278a532c06c54eb8c298ec..2320093a15c6e6428d461c6ee8f4d9d3d831c725 100644 (file)
--- a/lib/if.c
+++ b/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;