summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 342a2a2926..62b94761ad 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -809,8 +809,11 @@ static BOOL internal_resolve_name(const char *name, int name_type,
}
if(is_address) {
/* if it's in the form of an IP address then get the lib to interpret it */
- (*return_iplist)->s_addr = inet_addr(name);
- } else {
+ if (((*return_iplist)->s_addr = inet_addr(name)) == 0xFFFFFFFF ){
+ DEBUG(1,("internal_resolve_name: inet_addr failed on %s\n", name));
+ return False;
+ }
+ } else {
(*return_iplist)->s_addr = allones ? 0xFFFFFFFF : 0;
*return_count = 1;
}