1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Correctly check for inet_addr fail. Patch from gregor.7@osu.edu.

Jeremy.
(This used to be commit 01f6b26945)
This commit is contained in:
Jeremy Allison 2003-02-17 21:19:00 +00:00
parent 585d50c667
commit 3fe0de1fcf

View File

@ -809,8 +809,11 @@ static BOOL internal_resolve_name(const char *name, int name_type,
} }
if(is_address) { if(is_address) {
/* if it's in the form of an IP address then get the lib to interpret it */ /* if it's in the form of an IP address then get the lib to interpret it */
(*return_iplist)->s_addr = inet_addr(name); if (((*return_iplist)->s_addr = inet_addr(name)) == 0xFFFFFFFF ){
} else { DEBUG(1,("internal_resolve_name: inet_addr failed on %s\n", name));
return False;
}
} else {
(*return_iplist)->s_addr = allones ? 0xFFFFFFFF : 0; (*return_iplist)->s_addr = allones ? 0xFFFFFFFF : 0;
*return_count = 1; *return_count = 1;
} }