Rename same_net to same_net_v4 for consistency with Samba 3.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 23 Oct 2008 17:56:09 +0000 (19:56 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 23 Oct 2008 17:56:09 +0000 (19:56 +0200)
lib/util/util_net.c
source4/lib/socket/interface.c

index ee57e9dd230466645ed664d9805f1a81d62d9c59..7bd083cc3a9fa20ffafc86b2cf49d8997a046794 100644 (file)
@@ -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;
 
index b4e7c2bf3208a4892718553fc41dd0bbf47e9513..842f2f66c5eab7f5f72781e3af60d6d0f30ec699 100644 (file)
@@ -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));
 }