Date: Tue, 27 Sep 2022 18:41:30 -0500 From: Mike Karels <mike@karels.net> To: freebsd-net@freebsd.org Subject: Re: getaddrinfo error for existing host without requested address family Message-ID: <E4E72E7A-154E-406F-A663-5D81386E3A73@karels.net> In-Reply-To: <YzN8AgkDvCWV9jaw@straasha.imrryr.org> References: <202209272053.28RKrDEa004321@mail.karels.net> <YzN8AgkDvCWV9jaw@straasha.imrryr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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=E2=80=99ll report as indicated for= that domain. In my test case, I control the server :). Mike > -- = > Viktor.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E4E72E7A-154E-406F-A663-5D81386E3A73>