12745e
commit cf26a0cb6a0bbaca46a01ddad6662e5e5159a32a
12745e
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
12745e
Date:   Thu May 15 12:33:11 2014 +0530
12745e
12745e
    Return EAI_AGAIN for AF_UNSPEC when herrno is TRY_AGAIN (BZ #16849)
12745e
    
12745e
    getaddrinfo correctly returns EAI_AGAIN for AF_INET and AF_INET6
12745e
    queries.  For AF_UNSPEC however, an older change
12745e
    (a682a1bf553b1efe4dbb03207fece5b719cec482) broke the check and due to
12745e
    that the returned error was EAI_NONAME.
12745e
    
12745e
    This patch fixes the check so that a non-authoritative not-found is
12745e
    returned as EAI_AGAIN to the user instead of EAI_NONAME.
12745e
12745e
diff --git glibc-2.17-c758a686/sysdeps/posix/getaddrinfo.c glibc-2.17-c758a686/sysdeps/posix/getaddrinfo.c
12745e
index 6258330..8f392b9 100644
12745e
--- glibc-2.17-c758a686/sysdeps/posix/getaddrinfo.c
12745e
+++ glibc-2.17-c758a686/sysdeps/posix/getaddrinfo.c
12745e
@@ -867,8 +867,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
12745e
 		      if (status != NSS_STATUS_TRYAGAIN
12745e
 			  || rc != ERANGE || herrno != NETDB_INTERNAL)
12745e
 			{
12745e
-			  if (status == NSS_STATUS_TRYAGAIN
12745e
-			      && herrno == TRY_AGAIN)
12745e
+			  if (herrno == TRY_AGAIN)
12745e
 			    no_data = EAI_AGAIN;
12745e
 			  else
12745e
 			    no_data = herrno == NO_DATA;