From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30321 invoked from network); 5 Dec 2022 22:25:39 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 5 Dec 2022 22:25:39 -0000 Received: (qmail 16022 invoked by uid 550); 5 Dec 2022 22:25:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 15990 invoked from network); 5 Dec 2022 22:25:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fifth.space; s=20190812; t=1670279118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IFp9GyW+MA5lZJ+A4dKnyY35r5BIRK/rX5GO9vUdtW8=; b=pRqvHncwxSEHT6XFijtG2J11r0c13QqJQEVk7m4T0wIG9836q/s07MrvGeMep2VNs7FjJV BiarmYJvRxR5c559yG4eOp/998fDdlkksKLEaBo8HourwG/2Bt8m9EHt8Jv+6VIUDaUhpL VCSuKT9PgJ9uzjpyHpEoqaR9YmiJFo8I/Cu30hE86KoYqGzgN3dHul2DI2iuvaH/7+oKGk nA6w2MzSqu5rP0K/2TtVBhkdcOloXcrJcanzECLjH61nkDbiWH/BCoou0MH6YSa4OLY6r5 JII5VRuXg0s0n6OTP/kuFg5bOizcLyBiRQ2q3eQsyk33BPk9wwPVS7IbPKqslQ== Date: Mon, 5 Dec 2022 23:25:06 +0100 From: Quentin Rameau To: musl@lists.openwall.com Message-ID: <20221205232506.3d0c68df.quinq@fifth.space> In-Reply-To: <20221205201151.f6vr3hvi62x2lvwv@localhost> References: <20221204040254.pfd3bqjztfw4vrue@localhost> <20221204054559.GB23755@voyager> <20221204153132.GV29905@brightrain.aerifal.cx> <20221204230410.bf52c3xjs44xhgfo@localhost> <20221205132604.GW29905@brightrain.aerifal.cx> <20221205201151.f6vr3hvi62x2lvwv@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [musl] lookup_name issue with search domains Hi Kenny, > The API that's in question is called `gethostbyname*`. It's not getTXT, > or getMX or anything like that. When calling that I don't care if a name > exists, I care if a host exists. As such I expect the API to only look > at host records (and possibly dnssec that protect them). I wouldn't > really care if there was 10 odd new record types, if there's no host > records then there's no host at that name. Indeed, and that's what you get there. The DNS server is telling you it's authoritative (you'll get no better different answer from somebody else), the name exists, but its without an (IPv4) address. You get the error NO_DATA and your request ends there, as the authoritative entity of the domain told you so. > From my understanding of what you're saying: if the query response > doesn't contain error flags , it's indicating the name exists. That's > fine, the name exists. That doesn't mean the host exists. The response > that comes back has zero 'Answer RRs'. If searching should now stop > because the host was found, what's it's address? Searching ends there because the host was found by name, and the server said it doesn't have an associated address. > Reading a Linux man page on `resolv.conf` it says of the "Search list > for host-name lookup": > > >> Resolver queries having fewer than ndots dots (default is 1) in them > >> will be attempted using each component of the search path in turn > >> until a match is found. > So I guess it comes down to the question: Does this match a host? This matches a host, with no configured AF_INET address.