From: Ulrich Drepper Date: Mon, 17 Jan 2000 04:37:21 +0000 (+0000) Subject: (gaih_inet): Don't attempt name resolution if the hints included X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7665a38198f12f389947f34cf3ed6f5f79a1d914;p=thirdparty%2Fglibc.git (gaih_inet): Don't attempt name resolution if the hints included AI_NUMERICHOST. --- diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 5d6f3b8e971..b4d408d5d49 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -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;