mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: IPv4 and IPv6 addresses in resolv.conf
Date: Fri, 29 Nov 2013 19:37:04 -0500	[thread overview]
Message-ID: <20131130003704.GL24286@brightrain.aerifal.cx> (raw)
In-Reply-To: <20131129174410.GD24286@brightrain.aerifal.cx>

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


  reply	other threads:[~2013-11-30  0:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 10:09 orc
2013-11-29 17:44 ` Rich Felker
2013-11-30  0:37   ` Rich Felker [this message]
2013-11-30  1:18     ` Strake
2013-11-30  3:17       ` Rich Felker
2013-11-30  3:45         ` Strake
2013-11-30  3:51           ` Rich Felker
2013-11-30  3:59             ` Rich Felker
2013-11-30  9:16               ` Justin Cormack
2013-11-30 17:01                 ` Rich Felker
2013-11-30 17:23                   ` Justin Cormack
2013-11-30 17:30                     ` Rich Felker
2013-11-30 17:33                       ` Rob
2013-11-30 17:42                         ` Rich Felker
2013-11-30 17:43                         ` Justin Cormack
2013-11-30 18:52                           ` Rich Felker
2013-11-30  9:13             ` Laurent Bercot
2013-11-30 10:18               ` John Spencer
2013-11-30 16:53               ` Rich Felker
2013-11-30 15:27     ` orc
2013-12-03  2:11       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131130003704.GL24286@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).