Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 4 Oct 2017 18:46:38 +0200
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Subject: Re: DNS resolution happenning only after timeout

On Wed, Oct 04, 2017 at 07:18:10PM +0530, Srinivasa Raghavan wrote:
> Hi Rich,
> 
> Thanks for the reply.
> 
> Some updates:
> 1. Our DNS server is "Infoblox appliance".
> 2. When we had a delay, we found that there was a "AAAA" query along with
> "A" query.
> 
> I did further debugging with "tcpdump" and able to narrow down on the
> difference in behavior between "debian" and "alpine" images.
> 
> In debian:
> If ipv6 is disabled (net.ipv6.conf.default.disable_ipv6 = 1)
> Then the "nslookup" (or name resolution) does *not* do a "AAAA" query
> 

That's probably because glibc's DNS resolver only generates AAAA queries
if it can create an IPv6 socket.

> In alpine:
> If ipv6 is disabled (net.ipv6.conf.default.disable_ipv6 = 1)
> Then the "nslookup" (or name resolution) does an "AAAA" query along with
> "A" query
> 
> Is this intentional?
> 
> Also, I was wondering if there was any way to disable AAAA query in name
> resolution?
> 

There does not appear to be a way without changing code. In musl, the
function name_from_dns() will always generate both the AAAA and the A
query unless "family" is explicitly set to one of the address families.
No input from resolv.conf or similar is used for this. And "family"
comes directly from the caller, i.e. nslookup. You'd have to change the
nslookup code to only ask for IPv4 addresses.

> Kind Regards,
> Srinivasa Raghavan.

Ciao,
Markus

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.