[systemd-devel] Will *.network replace resolv.conf? What about "Options single-request"?

Lennart Poettering lennart at poettering.net
Mon May 18 08:48:46 PDT 2015


On Sat, 16.05.15 15:52, Alexander E. Patrakov (patrakov at gmail.com) wrote:

> 16.05.2015 02:01, Christian Brunotte wrote:
> >The resolver can send one DNS request packet (IPv4 or IPv6 doesn't matter) that
> >contains
> >queries for both the A and AAAA entries and the resolver may answer them in
> >separate packets.
> 
> I would be very much interested in seeing such successful conversation in a
> pcap file. Here is the reason why I don't really belive you: Unbound
> contains code that marks all DNS packets with multiple records in the query
> section as invalid. The code is in ./daemon/worker.c, function
> worker_check_request():
> 
> >        if(LDNS_QDCOUNT(sldns_buffer_begin(pkt)) != 1) {
> >                verbose(VERB_QUERY, "request wrong nr qd=%d",
> >                        LDNS_QDCOUNT(sldns_buffer_begin(pkt)));
> >                return LDNS_RCODE_FORMERR;
> >        }

Yes, the DNS protocol does not allow query sections with more than one
question. (mDNS does allow this however).

Also note that doing an ANY query instead of A or AAAA will not work
either, since ANY actually means just "give me any RR you have", but
not actually "give me all you have" that match the rest of the
query... An ANY query might hence yield a response with just the A RR,
with just the AAAA RR or with both, it's up to the server, and the
server has the complete freedom to choose between the three cases...

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list