From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11976 Path: news.gmane.org!.POSTED!not-for-mail From: Markus Wichmann Newsgroups: gmane.linux.lib.musl.general Subject: Re: DNS resolution happenning only after timeout Date: Wed, 4 Oct 2017 18:46:38 +0200 Message-ID: <20171004164638.4k3ozfsavcsthmhw@voyager> References: <20170928102854.GI15263@port70.net> <20170928165528.GA1627@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1507135616 18956 195.159.176.226 (4 Oct 2017 16:46:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 4 Oct 2017 16:46:56 +0000 (UTC) User-Agent: NeoMutt/20170113 (1.7.2) To: musl@lists.openwall.com Original-X-From: musl-return-11989-gllmg-musl=m.gmane.org@lists.openwall.com Wed Oct 04 18:46:53 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1dzmor-00043t-FT for gllmg-musl@m.gmane.org; Wed, 04 Oct 2017 18:46:49 +0200 Original-Received: (qmail 9613 invoked by uid 550); 4 Oct 2017 16:46:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 9583 invoked from network); 4 Oct 2017 16:46:52 -0000 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K0:xHYqEEi/Fs7PpabdRe/kWAtb3BpjvTvyO3TvYcUVVmf+6goBeU4 AcSD/XsAzp5YwRYz2/CU9QsN61SH2kAuphujUP8YKG4uIjHachmiq74x3KRjft1cClbWpCM Khs7nggPox/plkcLpcq2T1/1EC4kWSPW/bEDYeChSIPPjWhYO6qHJ+/LsmYUodsoP/KpzYD BdCBFoId9eH4Cz4gkSrTA== X-UI-Out-Filterresults: notjunk:1;V01:K0:XR9TeEPeNjw=:bVd5NbRQ6ly8R0nk7mwWXy P1q9QwBqdxwDTqpl5gQ0mHLYnGUXVoTaz2M/XSR75LjIsZzCoFyw1lLfB4frfZ6FpNHzntZiU J9i7OAwTP3FOKxeNtdcqdb29BjqyWpsbsk3eE6LJNkK6KCGRIYPrwilAsU5QzWzKd8vFHR/xP E0CQK6l27O0A08jjs84xp3SxyN9gKeJa2ft6v+0TADW05LNh4LNb/6zXSUaMFSc41Yhv2NwZw Ju4oIHypIB8Z2BWwg5FfM3a/pHmW+mN7F/NNtbzK7lX4Y6w3HNs9+6k0PCuj1nS5BNJ9LY8Pz Csu9399GcFtPehb8SLgpkAmD132J3D3g3hC2qzKe+XrhN5Jj4V6fFZrCzaOwglxF9e5Hxh8uk XODjrbZUiIgXN2Xfb8MD0kGyM91WTt4/0VJHp8A592sVJ/UhOt9YGSE6jZ9IE0NQUdW85DwiE OgWKIOsvm9CUjsaiMOuEukGG0IeNS7tMn661WRxVtWefuGXZKuvtgpxm+YgTcFdl0neF3Cu07 PRrVZSFKnjCg2ahxh7blOazCw15+JvkqdUuChnBqnJIyISF2kQc3rsoIlImJzWuN35y/hcZAb SlHjX/eR8V69UgYuP+eIsg3RB3mwJF+wRUBEBul7DplPSubImFIjfcrJeauzTu/FL/zr6oKat ajyYB3SXlEk/ym5tmIPWBHpkcHykPAbE8vqRf4ZvXTCyZ5NQPyQxVu6g1OZixaQjWBwAxYos7 Cri7SJQOKLeyjeqX0zS8eoWcGeJUL6+NQ/0SQSDLNn9gF1Cv7nbJo0J2GrnlmErSlyT82Dot Xref: news.gmane.org gmane.linux.lib.musl.general:11976 Archived-At: 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