summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/netif/interface.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/lib/netif/interface.c b/source4/lib/netif/interface.c
index 17a10c6799..2abb08e090 100644
--- a/source4/lib/netif/interface.c
+++ b/source4/lib/netif/interface.c
@@ -370,3 +370,13 @@ BOOL iface_is_local(const char *dest)
}
return False;
}
+
+/*
+ return True if a IP matches a IP/netmask pair
+*/
+BOOL iface_same_net(const char *ip1, const char *ip2, const char *netmask)
+{
+ return same_net(interpret_addr2(ip1),
+ interpret_addr2(ip2),
+ interpret_addr2(netmask));
+}