summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/if.c17
-rw-r--r--lib/if.h1
2 files changed, 1 insertions, 17 deletions
diff --git a/lib/if.c b/lib/if.c
index 6766a04b37..70c0c18141 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -564,24 +564,9 @@ size_t if_lookup_by_hwaddr(const uint8_t *hw_addr, size_t addrsz,
return count;
}
-/* Get the VRF loopback interface, i.e. the loopback on the default VRF
- * or the VRF interface.
- */
-struct interface *if_get_vrf_loopback(vrf_id_t vrf_id)
-{
- struct interface *ifp = NULL;
- struct vrf *vrf = vrf_lookup_by_id(vrf_id);
-
- FOR_ALL_INTERFACES (vrf, ifp)
- if (if_is_loopback(ifp))
- return ifp;
-
- return NULL;
-}
/* Get interface by name if given name interface doesn't exist create
- * one.
- */
+ one. */
struct interface *if_get_by_name(const char *name, vrf_id_t vrf_id,
const char *vrf_name)
{
diff --git a/lib/if.h b/lib/if.h
index a653246ccb..91dcd46247 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -532,7 +532,6 @@ static inline bool if_address_is_local(const void *matchaddr, int family,
struct vrf;
extern struct interface *if_lookup_by_name_vrf(const char *name, struct vrf *vrf);
extern struct interface *if_lookup_by_name(const char *ifname, vrf_id_t vrf_id);
-extern struct interface *if_get_vrf_loopback(vrf_id_t vrf_id);
extern struct interface *if_get_by_name(const char *ifname, vrf_id_t vrf_id,
const char *vrf_name);