[erlang-questions] IPV6_V6ONLY

Tony Rogvall tony@REDACTED
Mon Aug 23 20:02:00 CEST 2010


Hi!

I listened to what apple had to say about this and they tend to prefer the first option, and let
the kernel handle the IPv4 mapping. The reason is (future) backwards compatibility. 
In other words they suggest that every one should start using IPv6 only now. 
I am not sure about this, but it sound like a good thing for end point application hacks.
If you are somewhere in the middle you may want to distinguish between the to cases,
and take different action depending on situation.

/Tony


On 23 aug 2010, at 19.11, Per Hedeland wrote:

> Hi,
> 
> On Linux (and maybe some others), by default, when binding a socket to
> the IPv6 wildcard address, the socket accepts both IPv6 and IPv4, the
> latter in the form of IPv4-mapped IPv6. Trying to bind another socket
> with the same port and the IPv4 wildcard results in EADDRINUSE.
> 
> On *BSD, by default (and always on Windows I believe), the situation is
> the opposite - the IPv6-wildcard socket accepts only IPv6, and you need
> to bind another socket for IPv4 if you want to support both.
> 
> I believe there is some consensus in the networking community that the
> first behaviour is "bad" for various reasons. Be that as it may, it is
> unlikely to change, and it seems applications tend to ensure the second
> behavior by means of unconditionally using the IPV6_V6ONLY socket option
> in order to get consistent behavior across OSes (and avoid the "badness").
> 
> Since one strong point of Erlang/OTP is to as far as possible isolate
> the Erlang programmer from these annoying differences between OSes,
> could it be considered to make inet_drv always apply IPV6_V6ONLY (if it
> exists) for IPv6 sockets?
> 
> --Per Hedeland
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> 



More information about the erlang-questions mailing list