]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(gaih_inet): Don't fail if host has only IPv6 address.
authorUlrich Drepper <drepper@redhat.com>
Wed, 8 Dec 1999 09:16:44 +0000 (09:16 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 8 Dec 1999 09:16:44 +0000 (09:16 +0000)
sysdeps/posix/getaddrinfo.c

index ca8abc65dbb0e44b9d8bc632fa2e69cb4b342185..00788b7be18c28e3f7b17897479de487f6530c93 100644 (file)
@@ -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);