[erlang-questions] Auto-recognizing IPv6-tuple

Raimo Niskanen raimo+erlang-questions@REDACTED
Tue Aug 24 10:42:38 CEST 2010


On Mon, Aug 23, 2010 at 05:52:51PM +0200, Per Hedeland wrote:
> Hi,
> 
> Way back in the thread starting with
> http://www.erlang.org/cgi-bin/ezmlm-cgi/4/42722, I complained about "bad
> behaviour" when some gen_tcp and gen_udp functions were passed an IPv6
> 8-tuple without the 'inet6' (or 'inet') option, suggesting (with
> patches:-) that it would be more reasonable if IPv6 and IPv4 worked the
> same - i.e. an 8-tuple would imply 'inet6'. Raimo made me happy with the
> reply (in part):
> 
> > Not really. But as you see for gen_tcp:connect below, the inet6
> > option is currently required there even for an IPv6 address tuple.
> > These are corners we have not smoothed yet.
> 
> However the "bad behaviour" was fixed in R13B, not by auto-recognizing
> the 8-tuple but by exit(badarg), and this remains the case in R14A.
> Should I take this to mean that the auto-recognition won't happen? FWIW,
> the second version of the patches in that thread has been working fine
> in production for over a year - initially in R10B-10, later in R13B03 -
> and seems to apply cleanly and work fine with R14A too.

No, the remaining problem just fell into oblivion when contemplating
about what to do for the 4-tuple with option inet6...

If I remember correctly your second version of patches only fixed the
case of feeding an 8-tuple without using the inet6 option, and that
should be a safe feature to add.

(A git fetch patch would be easier to apply ;-)

> 
> --Per Hedeland
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED

-- 

/ Raimo Niskanen, Erlang/OTP, Ericsson AB


More information about the erlang-questions mailing list