From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4300 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: IPv4 and IPv6 addresses in resolv.conf Date: Fri, 29 Nov 2013 19:37:04 -0500 Message-ID: <20131130003704.GL24286@brightrain.aerifal.cx> References: <761df492-c2ee-41d5-84f8-faef313164bf@email.android.com> <20131129174410.GD24286@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1385771831 12142 80.91.229.3 (30 Nov 2013 00:37:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 30 Nov 2013 00:37:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4304-gllmg-musl=m.gmane.org@lists.openwall.com Sat Nov 30 01:37:17 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1VmYYf-0003Sx-Mr for gllmg-musl@plane.gmane.org; Sat, 30 Nov 2013 01:37:17 +0100 Original-Received: (qmail 14120 invoked by uid 550); 30 Nov 2013 00:37:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 14112 invoked from network); 30 Nov 2013 00:37:16 -0000 Content-Disposition: inline In-Reply-To: <20131129174410.GD24286@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4300 Archived-At: On Fri, Nov 29, 2013 at 12:44:10PM -0500, Rich Felker wrote: > On Fri, Nov 29, 2013 at 06:09:26PM +0800, orc wrote: > > Hi list, > > It is possible in future to have both ipv4 and ipv6 addresses in resolv.conf? > > Currently dns resolver reads first address and if it is ipv6 address > > then it goes on and second address (127.0.0.1 as example) also > > interpreted as ipv6 one, result is attempt to send data to > > 127::7f00:1. > > If this is happening, it's a bug. The intent is that both v4 and v6 > are supported. I'll see if I can reproduce it and if it's not too hard > to fix I'll try to get a fix in before the release. Can you clarify if you're using latest git or 0.9.14? I can't reproduce this in current git, but it looks like the misinterpretation was due to __ipparse bugs which nsz fixed. The behavior I'm seeing, which is what was intended (I was slightly wrong in my above expression of intent) is that only nameservers in the same address family as the first nameserver get used, and nameservers in the other get ignored. This is suboptimal but at least not horribly broken. What I think would be the correct behavior is noting whether any v6 addresses are seen, and if so, converting the v4 addresses to v4-mapped v6 addresses and using IPv6 for all communication. Does this sound reasonable? Rich