summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index bc13501..eb5e519 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1466,8 +1466,8 @@ ifa_free(struct ifaddr *ifa)
* Locate an interface based on a complete address.
*/
/*ARGSUSED*/
-struct ifaddr *
-ifa_ifwithaddr(struct sockaddr *addr)
+static struct ifaddr *
+ifa_ifwithaddr_internal(struct sockaddr *addr)
{
INIT_VNET_NET(curvnet);
struct ifnet *ifp;
@@ -1500,6 +1500,20 @@ done:
return (ifa);
}
+struct ifaddr *
+ifa_ifwithaddr(struct sockaddr *addr)
+{
+
+ return (ifa_ifwithaddr_internal(addr));
+}
+
+int
+ifa_ifwithaddr_check(struct sockaddr *addr)
+{
+
+ return (ifa_ifwithaddr_internal(addr) != NULL);
+}
+
/*
* Locate an interface based on the broadcast address.
*/
OpenPOWER on IntegriCloud