mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Quentin Rameau <quinq@fifth.space>
To: musl@lists.openwall.com
Subject: Re: [musl] lookup_name issue with search domains
Date: Mon, 5 Dec 2022 23:25:06 +0100	[thread overview]
Message-ID: <20221205232506.3d0c68df.quinq@fifth.space> (raw)
In-Reply-To: <20221205201151.f6vr3hvi62x2lvwv@localhost>

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.

  reply	other threads:[~2022-12-05 22:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04  4:02 Kenny MacDermid
2022-12-04  5:45 ` Markus Wichmann
2022-12-04 15:31   ` Rich Felker
2022-12-04 23:04     ` Kenny MacDermid
2022-12-05 13:26       ` Rich Felker
2022-12-05 20:11         ` Kenny MacDermid
2022-12-05 22:25           ` Quentin Rameau [this message]
2022-12-06  5:19             ` Kenny MacDermid
2022-12-06  9:57               ` Quentin Rameau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221205232506.3d0c68df.quinq@fifth.space \
    --to=quinq@fifth.space \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).