Date: Sat, 30 Nov 2013 23:27:43 +0800 From: orc <orc@...server.ru> To: musl@...ts.openwall.com Subject: Re: IPv4 and IPv6 addresses in resolv.conf Rich Felker <dalias@...ifal.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 I use probably too outdated 0.9.12. I also got interesting results while testing from git. Attached logs from strace for busybox ping. Files marked with '4' in names mean that first address in resolv.conf was ipv4 one then ipv6, while other two vice versa. Git build with ipv4 address given first fails with big loop and no host is resolved (huge log). Git version was built with debugging, shared and existing binary executed via invoking libc.so. Since ipv4 addresses are working right if come first, then your approach seems to be fine. Download attachment "log.tar.gz" of type "application/x-gzip" (40516 bytes)
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.