IPv6 incorrect setup (or resolver bug? or http client bug?)
Matthias Lang
matthias@REDACTED
Wed Oct 27 14:54:44 CEST 2004
Hi,
I know very little about IP6.
The 'inet' man page:
http://www.erlang.se/doc/doc-5.4/lib/kernel-2.10/doc/html/inet.html
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
evaluating
inet:getaddr("172.16.2.2", 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 172.16.2.2 an ip6 address?
**********
Why am I asking this?
I tried to use the http client (on cors, with R10B). Here's what
happened:
http:request(get, {"http://172.16.2.2:1234", []}, [], []).
{error,eafnosupport}
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
Matthias
More information about the erlang-questions
mailing list