summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-23 19:56:09 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-23 19:56:09 +0200
commitd1bc7e56d0584ef4f1051e39cd1a81182d63f096 (patch)
tree590be6fad54e997282989f9e21d6fe0ce96185d7
parentd6a5476ee7af464a381bbeeec576ee58f3650a43 (diff)
downloadsamba-d1bc7e56d0584ef4f1051e39cd1a81182d63f096.tar.gz
samba-d1bc7e56d0584ef4f1051e39cd1a81182d63f096.tar.bz2
samba-d1bc7e56d0584ef4f1051e39cd1a81182d63f096.zip
Rename same_net to same_net_v4 for consistency with Samba 3.
-rw-r--r--lib/util/util_net.c2
-rw-r--r--source4/lib/socket/interface.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index ee57e9dd23..7bd083cc3a 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -96,7 +96,7 @@ _PUBLIC_ bool is_zero_ip(struct in_addr ip)
Are two IPs on the same subnet?
**/
-_PUBLIC_ bool same_net(struct in_addr ip1, struct in_addr ip2, struct in_addr mask)
+_PUBLIC_ bool same_net_v4(struct in_addr ip1, struct in_addr ip2, struct in_addr mask)
{
uint32_t net1,net2,nmask;
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index b4e7c2bf32..842f2f66c5 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -53,7 +53,7 @@ static struct interface *iface_find(struct interface *interfaces,
for (i=interfaces;i;i=i->next)
if (CheckMask) {
- if (same_net(i->ip,ip,i->nmask)) return i;
+ if (same_net_v4(i->ip,ip,i->nmask)) return i;
} else if (i->ip.s_addr == ip.s_addr) return i;
return NULL;
@@ -173,7 +173,7 @@ static void interpret_interface(TALLOC_CTX *mem_ctx,
if (ip.s_addr == MKBCADDR(ip.s_addr, nmask.s_addr) ||
ip.s_addr == MKNETADDR(ip.s_addr, nmask.s_addr)) {
for (i=0;i<total_probed;i++) {
- if (same_net(ip, probed_ifaces[i].ip, nmask)) {
+ if (same_net_v4(ip, probed_ifaces[i].ip, nmask)) {
add_interface(mem_ctx, probed_ifaces[i].ip, nmask,
local_interfaces);
talloc_free(address);
@@ -329,7 +329,7 @@ bool iface_is_local(struct interface *ifaces, const char *dest)
*/
bool iface_same_net(const char *ip1, const char *ip2, const char *netmask)
{
- return same_net(interpret_addr2(ip1),
+ return same_net_v4(interpret_addr2(ip1),
interpret_addr2(ip2),
interpret_addr2(netmask));
}