From nobody Tue Sep 27 23:41:30 2022 X-Original-To: freebsd-net@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Mcbk55pnXz4dW9v for ; Tue, 27 Sep 2022 23:41:33 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4Mcbk50JsLz3Kqx for ; Tue, 27 Sep 2022 23:41:32 +0000 (UTC) (envelope-from mike@karels.net) Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTP id 28RNfV5I005113 for ; Tue, 27 Sep 2022 18:41:31 -0500 (CDT) (envelope-from mike@karels.net) Received: from [10.0.2.130] ([10.0.1.1]) by mail.karels.net with ESMTPSA id 1YZNIyuKM2P3EwAA4+wvSQ (envelope-from ) for ; Tue, 27 Sep 2022 18:41:31 -0500 From: Mike Karels To: freebsd-net@freebsd.org Subject: Re: getaddrinfo error for existing host without requested address family Date: Tue, 27 Sep 2022 18:41:30 -0500 X-Mailer: MailMate (1.14r5913) Message-ID: In-Reply-To: References: <202209272053.28RKrDEa004321@mail.karels.net> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4Mcbk50JsLz3Kqx X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mike@karels.net designates 216.160.39.52 as permitted sender) smtp.mailfrom=mike@karels.net X-Spamd-Result: default: False [-3.17 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_LONG(-0.99)[-0.989]; NEURAL_HAM_SHORT(-0.98)[-0.977]; R_SPF_ALLOW(-0.20)[+ip4:216.160.39.52]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; DMARC_NA(0.00)[karels.net]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[mike]; ARC_NA(0.00)[]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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.