]>
Commit | Line | Data |
---|---|---|
bd76bcb8 MT |
1 | commit cf26a0cb6a0bbaca46a01ddad6662e5e5159a32a |
2 | Author: Siddhesh Poyarekar <siddhesh@redhat.com> | |
3 | Date: Thu May 15 12:33:11 2014 +0530 | |
4 | ||
5 | Return EAI_AGAIN for AF_UNSPEC when herrno is TRY_AGAIN (BZ #16849) | |
6 | ||
7 | getaddrinfo correctly returns EAI_AGAIN for AF_INET and AF_INET6 | |
8 | queries. For AF_UNSPEC however, an older change | |
9 | (a682a1bf553b1efe4dbb03207fece5b719cec482) broke the check and due to | |
10 | that the returned error was EAI_NONAME. | |
11 | ||
12 | This patch fixes the check so that a non-authoritative not-found is | |
13 | returned as EAI_AGAIN to the user instead of EAI_NONAME. | |
14 | ||
15 | diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c | |
16 | index 6258330..8f392b9 100644 | |
17 | --- a/sysdeps/posix/getaddrinfo.c | |
18 | +++ b/sysdeps/posix/getaddrinfo.c | |
19 | @@ -867,8 +867,7 @@ gaih_inet (const char *name, const struct gaih_service *service, | |
20 | if (status != NSS_STATUS_TRYAGAIN | |
21 | || rc != ERANGE || herrno != NETDB_INTERNAL) | |
22 | { | |
23 | - if (status == NSS_STATUS_TRYAGAIN | |
24 | - && herrno == TRY_AGAIN) | |
25 | + if (herrno == TRY_AGAIN) | |
26 | no_data = EAI_AGAIN; | |
27 | else | |
28 | no_data = herrno == NO_DATA; |