Re: getaddrinfo error for existing host without requested address family
- In reply to: Viktor Dukhovni : "Re: getaddrinfo error for existing host without requested address family"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Sep 2022 23:41:30 UTC
On 27 Sep 2022, at 17:41, Viktor Dukhovni wrote: > On Tue, Sep 27, 2022 at 03:53:12PM -0500, Mike Karels wrote: > >> The first error message is misleading, because the name *does* resolve, >> but has no AAAA record, and it is the same error message as for a name >> that truly does not exist. > > FWIW, the distinction between NODATA and NXDOMAIN is these days not > infrequently violated at the authoritative nameserver: > > https://datatracker.ietf.org/doc/html/draft-valsorda-dnsop-black-lies-00 > > So whether or not a name actually exists or just fails to have the > requested record type is at times not easily determined. :-( All getaddrinfo() can do is translate what the resolver receives: - If there is an NXDOMAIN error, we should report that the name does not resolve; - If there is no error but no record of the requested type in the answer, we should report that there is no address of the requested type. If the server always uses NXDOMAIN, we’ll report as indicated for that domain. In my test case, I control the server :). Mike > -- > Viktor.