summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/if.c12
-rw-r--r--lib/if.h6
-rw-r--r--lib/zclient.c6
-rw-r--r--ospfd/ospf_zebra.c3
4 files changed, 10 insertions, 17 deletions
diff --git a/lib/if.c b/lib/if.c
index c4deeb792..633c949ca 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... */
diff --git a/lib/if.h b/lib/if.h
index 72d78c5d5..7a1274c31 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -417,12 +417,10 @@ extern struct interface *if_get_by_name_vrf (const char *ifname,
/* For these 2 functions, the namelen argument should be the precise length
of the ifname string (not counting any optional trailing '\0' character).
In most cases, strnlen should be used to calculate the namelen value. */
-extern struct interface *if_lookup_by_name_len(const char *ifname,
- size_t namelen);
extern struct interface *if_get_by_name_len(const char *ifname,size_t namelen);
-extern struct interface *if_lookup_by_name_len_vrf(const char *ifname,
- size_t namelen, vrf_id_t vrf_id);
+extern struct interface *if_lookup_by_name_len(const char *ifname,
+ size_t namelen, vrf_id_t vrf_id);
extern struct interface *if_get_by_name_len_vrf(const char *ifname,
size_t namelen, vrf_id_t vrf_id, int vty);
diff --git a/lib/zclient.c b/lib/zclient.c
index 990bf7906..2a4816625 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -1092,9 +1092,9 @@ zebra_interface_state_read (struct stream *s, vrf_id_t vrf_id)
stream_get (ifname_tmp, s, INTERFACE_NAMSIZ);
/* Lookup this by interface index. */
- ifp = if_lookup_by_name_len_vrf (ifname_tmp,
- strnlen (ifname_tmp, INTERFACE_NAMSIZ),
- vrf_id);
+ ifp = if_lookup_by_name_len (ifname_tmp,
+ strnlen (ifname_tmp, INTERFACE_NAMSIZ),
+ vrf_id);
if (ifp == NULL)
{
zlog_warn ("INTERFACE_STATE: Cannot find IF %s in VRF %d",
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index b0ff5d0e3..cb14273ee 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -165,7 +165,8 @@ zebra_interface_if_lookup (struct stream *s, vrf_id_t vrf_id)
/* And look it up. */
return if_lookup_by_name_len(ifname_tmp,
- strnlen(ifname_tmp, INTERFACE_NAMSIZ));
+ strnlen(ifname_tmp, INTERFACE_NAMSIZ),
+ VRF_DEFAULT);
}
static int