This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug network/15726] getaddrinfo() returns incorrect status


http://sourceware.org/bugzilla/show_bug.cgi?id=15726

--- Comment #28 from Rich Felker <bugdal at aerifal dot cx> ---
On Wed, Aug 28, 2013 at 09:20:00PM +0000, kurt at roeckx dot be wrote:
> I can interpret the "for the supplied parameters" as meaning the AI_NUMERIC*
> cases, since it seems the reason for the failure is is the parameters.  And the
> text above indicates in which cases EAI_NONAME should be returned.

The "supplied parameters" would include AI_NUMERIC* as well as the
requested address family.

> EAI_FAIL on the other hand talks about a "non-recoverable error", which can be
> just about anything.

A negative response is not an "error" at all, much less a
non-recoverable error. Even if it were, it's clearly not the kind of
thing EAI_FAIL was intended to represent.

> We should just not use that nameserver anymore (for the current lookup), and if
> we find no nameservers that give us an answer it should result in "no answer" /
> EAI_FAIL.  But I'm not sure how detailed we should go with all those things.

If the nameserver gives response code 5, you could discontinue using
it for the current request, but it probably shouldn't be dropped in
general -- for example, the nameserver might be denying recursion but
serving a local domain only. In any case, EAI_FAIL is the right
response here if the only nameserver(s) available give(s) response
code 5, since it's not a temporary condition, there's no way to work
around it, and it's neither a positive result nor a negative result.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]