mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: musl@lists.openwall.com
Subject: Re: DNS resolver patch
Date: Thu, 30 May 2019 09:54:02 -0400	[thread overview]
Message-ID: <20190530135402.GM23599@brightrain.aerifal.cx> (raw)
In-Reply-To: <87o93kba29.fsf@mid.deneb.enyo.de>

On Thu, May 30, 2019 at 10:50:22AM +0200, Florian Weimer wrote:
> * Rich Felker:
> > On Thu, Dec 27, 2018 at 08:18:16PM +0100, Florian Weimer wrote:
> >> glibc has code which switches to the next configured nameserver upon
> >> encountering what looks like a referral:
> >> 
> >> 		if (anhp->rcode == NOERROR && anhp->ancount == 0
> >> 		    && anhp->aa == 0 && anhp->ra == 0 && anhp->arcount == 0) {
> >> 			goto next_ns;
> >> 		}
> >
> > Can you elaborate or provide a citation on how this "looks like a
> > referral"? I don't see any obvious difference between this and a
> > nodata response except possibly RA==0, which would only happen when
> > you have an auth-only nameserver listed in your resolv.conf.
> 
> But that's exactly the scenario when people want to ignore referrals.
> A name server which provides recursive service will never send a
> referral, after all.  If it cannot complete the recursion, it will
> respond with SERVFAIL instead.

Yes, I just wasn't clear how to interpret that combination of bits. I
should re-read the spec I guess.

> > This would not be useful for unioning in musl because it depends on
> > an ordering between the nameservers rather than providing a true
> > union; at least one of the servers is going to be recursive and
> > return an nxdomain or nodata which could be seen before the
> > auth-only local server responds.
> 
> I expect that the authoritative-only server is put first in this case.

Note that musl does not have a concept of an order between the
nameservers; they're just treated as alternative sources for the same
data.

> My position is that this is not really worth supporting, though.  It's
> easy enough to run a local caching resolver which can implement such
> policies, including forwarding queries for certain zones to certain
> authoritative servers.  Then there's no need to resort to search path
> hacks and listing non-recursive name servers in etc/resolv.conf.

I agree completely. Fancy policy things like unioning and remapping
are best done in an external process. Moreover, with DNS privacy and
integrity becoming such a critical issue in the future (or perhaps the
present), it's going to be mandatory to run a (proxy, at least)
nameserver on localhost anyway to perform DNSSEC validation and/or
DNS-over-HTTPS.

Rich


  reply	other threads:[~2019-05-30 13:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <882247050.3003099.1544074074084.JavaMail.zimbra@totalphase.com>
2018-12-06  5:31 ` Tarun Johar
2018-12-06 14:13   ` Rich Felker
2018-12-06 15:23     ` Natanael Copa
2018-12-06 14:53   ` Florian Weimer
2018-12-06 15:48     ` Natanael Copa
2018-12-06 18:18       ` Florian Weimer
2018-12-06 18:38         ` A. Wilcox
2018-12-06 19:46           ` Laurent Bercot
2018-12-25  2:06             ` Rich Felker
2018-12-27 19:18               ` Florian Weimer
2018-12-28 17:21                 ` Rich Felker
2019-05-30  8:50                   ` Florian Weimer
2019-05-30 13:54                     ` Rich Felker [this message]
2018-12-06 20:36           ` Florian Weimer
2018-12-06 21:01             ` Rich Felker
2018-12-06 18:50       ` Tarun Johar
2018-12-06 19:36         ` Tarun Johar

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=20190530135402.GM23599@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=fw@deneb.enyo.de \
    --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).