mirror of
https://github.com/samba-team/samba.git
synced 2025-11-08 16:23:49 +03:00
r8002: favor addresses on our local interfaces in NBT name resolution if
possible. This is needed because w2k3 will return bogus IPs in its name resolution replies when it has an unplugged network interface.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
90d0f502da
commit
2fafc23052
@@ -353,3 +353,16 @@ const char *iface_best_ip(const char *dest)
|
||||
}
|
||||
return iface_n_ip(0);
|
||||
}
|
||||
|
||||
/*
|
||||
return True if an IP is one one of our local networks
|
||||
*/
|
||||
BOOL iface_is_local(const char *dest)
|
||||
{
|
||||
struct in_addr ip;
|
||||
ip.s_addr = interpret_addr(dest);
|
||||
if (iface_find(ip, True)) {
|
||||
return True;
|
||||
}
|
||||
return False;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user