summaryrefslogtreecommitdiffstats
path: root/source/libsmb/namequery.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-12-09 14:01:57 -0800
committerJames Peach <jpeach@samba.org>2007-12-09 14:01:57 -0800
commit4786654992e3cb2280b77406f9217fcec981602c (patch)
treefc4be5508b5101d7259059ddb6ba778b0ae5b295 /source/libsmb/namequery.c
parent87c302e250aacc4d5d6a3cce3f134dd13fa457bf (diff)
downloadsamba-4786654992e3cb2280b77406f9217fcec981602c.tar.gz
samba-4786654992e3cb2280b77406f9217fcec981602c.tar.xz
samba-4786654992e3cb2280b77406f9217fcec981602c.zip
Specifically ask for IP4 addresses if we don't have IP6 support.
Diffstat (limited to 'source/libsmb/namequery.c')
-rw-r--r--source/libsmb/namequery.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/libsmb/namequery.c b/source/libsmb/namequery.c
index 9650b5fc455..e4206e6065c 100644
--- a/source/libsmb/namequery.c
+++ b/source/libsmb/namequery.c
@@ -1244,6 +1244,11 @@ static NTSTATUS resolve_hosts(const char *name, int name_type,
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_ADDRCONFIG;
+#if !defined(HAVE_IPV6)
+ /* Unless we have IPv6, we really only want IPv4 addresses back. */
+ hints.ai_family = AF_INET;
+#endif
+
ret = getaddrinfo(name,
NULL,
&hints,