Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 30 May 2019 09:54:02 -0400
From: Rich Felker <>
To: Florian Weimer <>
Subject: Re: DNS resolver patch

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

> 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


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.