1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

cope with direct IP addresses in resolve_name()

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 4f4f898348
commit 73a59170e6

View File

@ -954,6 +954,11 @@ BOOL resolve_name(const char *name, struct in_addr *return_ip, int name_type)
struct in_addr *ip_list = NULL;
int count = 0;
if (is_ipaddress(name)) {
*return_ip = *interpret_addr2(name);
return True;
}
if (internal_resolve_name(name, name_type, &ip_list, &count)) {
int i;
/* only return valid addresses for TCP connections */