summaryrefslogtreecommitdiff
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
commit39f0e6d22cc9ffed65cfe16b7fa9d69940261532 (patch)
tree324c7ee1e143afdf10ec8ea6816abdc9d1a1ea53
parentc553b6f7fa8ef15863448ff9cd1fa08f9f2d7c96 (diff)
downloadsamba-39f0e6d22cc9ffed65cfe16b7fa9d69940261532.tar.gz
samba-39f0e6d22cc9ffed65cfe16b7fa9d69940261532.tar.bz2
samba-39f0e6d22cc9ffed65cfe16b7fa9d69940261532.zip
Specifically ask for IP4 addresses if we don't have IP6 support.
(This used to be commit 4786654992e3cb2280b77406f9217fcec981602c)
-rw-r--r--source3/libsmb/namequery.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 9650b5fc45..e4206e6065 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/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,