Bug 1044628
Summary: | getaddrinfo return EAI_NONAME instead of EAI_AGAIN in case the DNS query times out | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Patrik Kis <pkis> | |
Component: | glibc | Assignee: | Siddhesh Poyarekar <spoyarek> | |
Status: | CLOSED ERRATA | QA Contact: | Arjun Shankar <ashankar> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.6 | CC: | ashankar, codonell, fweimer, jkurik, jtrowbri, ksrot, mcermak, mnewsome, nalayil, pfrankli, spoyarek | |
Target Milestone: | rc | Keywords: | ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | glibc-2.12-1.140.el6 | Doc Type: | Bug Fix | |
Doc Text: |
The getaddrinfo function returns a permanent error EAI_NONAME when the DNS server is unreachable or the DNS query times out. This is now fixed so that the function returns EAI_AGAIN to indicate a temporary failure in name resolution.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1098042 (view as bug list) | Environment: | ||
Last Closed: | 2014-10-14 04:42:45 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 928849, 994246, 1023566, 1028635, 1042734, 1056252, 1098050 |
Description
Patrik Kis
2013-12-18 17:37:53 UTC
*** Bug 758193 has been marked as a duplicate of this bug. *** OK, so it is indeed the discrepancy that was pointed out in bug 758193 that was the problem. For AF_INET and AF_INET6, the returned error code is (as always has been) EAI_AGAIN. For AF_UNSPEC though, the error returned is EAI_NONAME, which is wrong. EAI_NONAME is an authoritative response saying that the result was not found. This does not match with the result of network being down because the latter is a transient failure and not necessarily a permanent one. Likewise, the herrno value (TRY_AGAIN) is a non-authoritative not-found response, so marking a permanent failure for it would be wrong. As a result, the correct behaviour is to return EAI_AGAIN when the server is not reachable, as this bug requests. I have posted a patch that fixes the broken behaviour for AF_UNSPEC: https://sourceware.org/ml/libc-alpha/2014-04/msg00321.html I would really appreciate testing feedback on this because the code is quite fragile and hence prone to regressions. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2014-1391.html |