1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

Rename same_net to same_net_v4 for consistency with Samba 3.

This commit is contained in:
Jelmer Vernooij 2008-10-23 19:56:09 +02:00
parent d6a5476ee7
commit d1bc7e56d0
2 changed files with 4 additions and 4 deletions

View 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;

View 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));
}