about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorStan Shebs <stanshebs@google.com>2016-08-05 14:12:59 -0700
committerStan Shebs <stanshebs@google.com>2016-08-05 14:12:59 -0700
commitf01f990def48b88d819221907fee42308ad44520 (patch)
tree221137bcad41deb659bdaa665a3f0226dde248ea /sysdeps/posix
parentc0872d83ef8b103f7f6c702267ac280d4aa5f277 (diff)
downloadglibc-f01f990def48b88d819221907fee42308ad44520.tar.gz
glibc-f01f990def48b88d819221907fee42308ad44520.tar.xz
glibc-f01f990def48b88d819221907fee42308ad44520.zip
Fix error handling in getaddrinfo.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/getaddrinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 2471a1a458..1c5328352e 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1067,7 +1067,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
 
 	  _res.options |= old_res_options & RES_USE_INET6;
 
-	  if (h_errno == NETDB_INTERNAL)
+	  if (status == NSS_STATUS_UNAVAIL && h_errno == NETDB_INTERNAL)
 	    {
 	      result = -EAI_SYSTEM;
 	      goto free_and_return;