Message ID | 20170808170141.3A34E4029923B@oldenburg.str.redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index eaf8baf..9d9e7e2 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -949,7 +949,10 @@ gaih_inet (const char *name, const struct gaih_service *service, __resolv_context_enable_inet6 (res_ctx, res_enable_inet6); __resolv_context_put (res_ctx); - if (h_errno == NETDB_INTERNAL) + /* If we have a failure which sets errno, report it using + EAI_SYSTEM. */ + if ((status == NSS_STATUS_TRYAGAIN || status == NSS_STATUS_UNAVAIL) + && h_errno == NETDB_INTERNAL) { result = -EAI_SYSTEM; goto free_and_return;