Date: Fri, 29 Nov 2013 22:51:16 -0500 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: IPv4 and IPv6 addresses in resolv.conf On Fri, Nov 29, 2013 at 10:45:26PM -0500, Strake wrote: > On 29/11/2013, Rich Felker <dalias@...ifal.cx> wrote: > > But that would mean complete unconditional DNS failure on systems > > lacking IPv6. > > We could do so iff system has IPv6. Switching on whether system has > IPv6 rather than whether resolv.conf has any IPv6 nameservers means > * no check whether resolv.conf includes v6 server > * that adding a v6 server to resolv.conf can not break DNS even on > systems lacking v6 > which seems saner. OK, so how do we detect if the system "has IPv6"? I don't think it's an easy question to answer, but it's not just a rhetorical question either since we need to know for the AI_ADDRCONFIG flag that's not yet working, so this may very well be the right way to go. One other option that's of course the safest is just opening two sockets, one for IPv4 and one for IPv6, if both are needed, but that of course complicates, bloats, and slows down the code and adds failure cases so I'd rather avoid it. Rich
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.