about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-08 09:15:00 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-08 09:15:00 +0000
commit5ad81f408575e08b47eac609161dfa12c57da671 (patch)
tree14e25a243b7b73e00cbd8917126c610094e0b4b6 /sysdeps
parent7eda722de5ee2e56f6590641e190ddc66fb60eb5 (diff)
downloadglibc-5ad81f408575e08b47eac609161dfa12c57da671.tar.gz
glibc-5ad81f408575e08b47eac609161dfa12c57da671.tar.xz
glibc-5ad81f408575e08b47eac609161dfa12c57da671.zip
Update.
1999-12-08  Ulrich Drepper  <drepper@cygnus.com>

	* sysdeps/posix/getaddrinfo.c (gaih_inet): Don't fail if host has
	only IPv6 address.  Reported by Artur Frysiak <wiget@pld.org.pl>.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/posix/getaddrinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index ca8abc65db..00788b7be1 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -368,14 +368,16 @@ gaih_inet (const char *name, const struct gaih_service *service,
 	  struct hostent *h;
 	  struct gaih_addrtuple **pat = &at;
 	  int no_data = 0;
+	  int no_inet6_data;
 
 	  if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET6)
 	    gethosts (AF_INET6, struct in6_addr);
+	  no_inet6_data = no_data;
 
 	  if (req->ai_family == AF_UNSPEC || req->ai_family == AF_INET)
 	    gethosts (AF_INET, struct in_addr);
 
-	  if (no_data != 0)
+	  if (no_data != 0 && no_inet6_data != 0)
 	    /* We made requests but they turned out no data.  The name
 	       is known, though.  */
 	    return (GAIH_OKIFUNSPEC | -EAI_NODATA);