IPv6 incorrect setup (or resolver bug? or http client bug?)

Matthias Lang matthias@REDACTED
Wed Oct 27 14:54:44 CEST 2004


I know very little about IP6.

The 'inet' man page:


says that inet:getaddr/2 is prepared for inet6. Trying it out on some
debian machines I have, none of which are configured for IP6, by

  inet:getaddr("", inet6)

gives me varying results:

  Host        Erlang release     Result
  antilipe    R9C                {ok,{172,16,2,2}}
  cors        R10B               {ok,{172,16,2,2}}
  cors        R9C                {error, timeout}

Is an ip6 address?


Why am I asking this?

I tried to use the http client (on cors, with R10B). Here's what

  http:request(get, {"", []}, [], []).

digging in the http client code a bit, I can see that
http_transport:connect() calls inet:getaddr(Host, inet6), apparently
to decide whether the host supports IP6 or not.

Things which seem wrong:

   1. inet:getaddr(Host, inet6) doesn't seem to be a reliable
      way to determine whether the TCP socket should use inet6
      option, but http_transport thinks it is.

   2. the inet documentation seems to say that inet_getaddr(Host,
      inet6) isn't implemented yet, yet http_transport uses it

   3. Maybe my machines' configuration is broken


More information about the erlang-questions mailing list