about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-18 06:53:09 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-18 06:53:09 +0000
commitf1a785acbf05051be4963474f2307aad77fff16b (patch)
tree5a432a98f452b7017d03700467222aba2da8c8f8 /sysdeps/posix
parent2d29aba941a4b4ba789f2e0f591ebe85d3ea300a (diff)
downloadglibc-f1a785acbf05051be4963474f2307aad77fff16b.tar.gz
glibc-f1a785acbf05051be4963474f2307aad77fff16b.tar.xz
glibc-f1a785acbf05051be4963474f2307aad77fff16b.zip
Update.
	* sysdeps/posix/getaddrinfo.c (gaih_local): If name is given and
	AI_NUMERICHOST flag is set, return an error.
	Patch by Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index b4d408d5d4..9b66676e1c 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -124,6 +124,9 @@ gaih_local (const char *name, const struct gaih_service *service,
 {
   struct utsname utsname;
 
+  if ((name != NULL) && (req->ai_flags & AI_NUMERICHOST))
+    return GAIH_OKIFUNSPEC | -EAI_NONAME;
+
   if ((name != NULL) || (req->ai_flags & AI_CANONNAME))
     if (uname (&utsname))
       return -EAI_SYSTEM;