]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(gaih_inet): Don't attempt name resolution if the hints included
authorUlrich Drepper <drepper@redhat.com>
Mon, 17 Jan 2000 04:37:21 +0000 (04:37 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 17 Jan 2000 04:37:21 +0000 (04:37 +0000)
AI_NUMERICHOST.

sysdeps/posix/getaddrinfo.c

index 5d6f3b8e971352874dc7bfd810405efcdcf85100..b4d408d5d49340b6187fdce59d64b1233b5851d7 100644 (file)
@@ -381,7 +381,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
            return -EAI_ADDRFAMILY;
        }
 
-      if (at->family == AF_UNSPEC)
+      if (at->family == AF_UNSPEC && (req->ai_flags & AI_NUMERICHOST) == 0)
        {
          struct hostent *h;
          struct gaih_addrtuple **pat = &at;