From 7665a38198f12f389947f34cf3ed6f5f79a1d914 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 17 Jan 2000 04:37:21 +0000 Subject: [PATCH] (gaih_inet): Don't attempt name resolution if the hints included AI_NUMERICHOST. --- sysdeps/posix/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2