1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r11710: added function iface_same_net()

(This used to be commit 3e36b30194)
This commit is contained in:
Andrew Tridgell 2005-11-14 01:50:26 +00:00 committed by Gerald (Jerry) Carter
parent b5fdc3609e
commit df4624870b

View File

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