From 39f0e6d22cc9ffed65cfe16b7fa9d69940261532 Mon Sep 17 00:00:00 2001 From: James Peach Date: Sun, 9 Dec 2007 14:01:57 -0800 Subject: Specifically ask for IP4 addresses if we don't have IP6 support. (This used to be commit 4786654992e3cb2280b77406f9217fcec981602c) --- source3/libsmb/namequery.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/libsmb/namequery.c') 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, -- cgit