summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-11 07:09:21 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-15 10:32:09 -0400
commitfa787f911c3063133e4cdc7788645766e64376eb (patch)
treed2ff9a6a911342d5e21c61a1edc7ec07af9922ce /lib/if.c
parent95af5f130aca6c73465112e18f0dbe7fa4b3c979 (diff)
lib, ospfd: Refactor if_lookup_by_name_len
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/if.c')
-rw-r--r--lib/if.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/if.c b/lib/if.c
index c4deeb7920..633c949ca3 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -315,7 +315,7 @@ if_lookup_by_name (const char *name)
}
struct interface *
-if_lookup_by_name_len_vrf (const char *name, size_t namelen, vrf_id_t vrf_id)
+if_lookup_by_name_len (const char *name, size_t namelen, vrf_id_t vrf_id)
{
struct listnode *node;
struct interface *ifp;
@@ -331,12 +331,6 @@ if_lookup_by_name_len_vrf (const char *name, size_t namelen, vrf_id_t vrf_id)
return NULL;
}
-struct interface *
-if_lookup_by_name_len(const char *name, size_t namelen)
-{
- return if_lookup_by_name_len_vrf (name, namelen, VRF_DEFAULT);
-}
-
/* Lookup interface by IPv4 address. */
struct interface *
if_lookup_exact_address (void *src, int family, vrf_id_t vrf_id)
@@ -466,7 +460,7 @@ if_get_by_name_len_vrf (const char *name, size_t namelen, vrf_id_t vrf_id, int v
struct vrf *vrf;
struct listnode *node;
- ifp = if_lookup_by_name_len_vrf (name, namelen, vrf_id);
+ ifp = if_lookup_by_name_len (name, namelen, vrf_id);
if (ifp)
return ifp;
@@ -705,7 +699,7 @@ if_sunwzebra_get (const char *name, size_t nlen, vrf_id_t vrf_id)
struct interface *ifp;
size_t seppos = 0;
- if ( (ifp = if_lookup_by_name_len_vrf (name, nlen, vrf_id)) != NULL)
+ if ( (ifp = if_lookup_by_name_len (name, nlen, vrf_id)) != NULL)
return ifp;
/* hunt the primary interface name... */