[erlang-questions] : Broken ipv6 behavior?

Rory Byrne rory@REDACTED
Wed Apr 9 17:05:56 CEST 2008


On Wed, Apr 09, 2008 at 03:41:40AM -0700, Matthew Dempsky wrote:
> On Wed, Apr 9, 2008 at 3:26 AM, Rory Byrne <rory@REDACTED> wrote:
> > On Wed, Apr 09, 2008 at 11:04:11AM +0200, Raimo Niskanen wrote:
> >  >
> >  > These functions seem to work on a MacOS X Leopard box
> >  > in our lab, there I get:
> >  > inet_gethost_native:gethostbyname("ipv6.google.com", inet6).
> >  > inet_gethost[63317] (DEBUG):Saved domainname .google.com.
> >  > inet_gethost[63317] (DEBUG):Created worker[63418] with fd 3
> >  > inet_gethost[63317] (DEBUG):Saved domainname .google.com.
> >  > inet_gethost[63418] (DEBUG):Worker got request, op = 1, proto = 2, data = ipv6.google.com.
> >  > {error,notfound}
> >  >
> >  > Not strange since we do not have working IPv6 here at work.
> >  >
> >
> >  Is this only {error,notfound} when you use an {inet6, true}
> >  configuration? There should be no problem looking up AAAA
> >  DNS records over IPv4:
> 
> Testing at home with OS X (IPv6 link-local access only), I get
> {error,notfound} with or without {inet6, true}.
> 
> ipv6.google.com's AAAA records still resolve fine with dig/host/etc.
>

Might be a problem. I'm guessing that most people are 
going to expect to resolve all their DNS queries over 
IPv4 for many years to come. I would have assumed the 
following:

. Using {inet6, false} should mean: only query IPv4 DNS 
  servers. It shouldn't effect what you can query, so you 
  should be able to get AAAA records without a problem.

. Using {inet6, true} should mean: use an IPv6 DNS server
  to resolve queries if one is configured. Failing that,
  use any IPv4 DNS servers that are configured. Again,
  the content of your query should not be effected.

Not saying that this is the way it should be, just that
this would have been my initial assumption.

Anyway, it appears that the problem is on the link 
between erlang and the local resolver. However, if 
your planning on doing any elaborate debugging on 
this stuff, it might be worth keeping in mind that 
none of google's DNS servers have IPv6 addresses, 
so all queries to them will ultimately go over IPv4. 
The DNS servers for kame.net do have IPv6 addresses 
(eg: dig -6 aaaa www.kame.net @orange.kame.net). 

Good luck,

Rory




More information about the erlang-questions mailing list