Subject: | IPv6 default behavior logic improvement |
Hello,
The POD's IPv6 section it says:
"If you give a name as a host and the host resolves to both IPv6 and IPv4 it will try IPv6 first
and if there is no IPv6 connectivity it will fail."
Wouldn't it be better, if the host resolved to both IPv6 and IPv4 to:
try IPv6, if that fails try IPv4, and if that fails *then* die
?
I've found often that clients resolve to both IPv6/4 but really only use IPv4 for anything. And
hence things ambiguously break with some obscure errors buried deep in a strace that
vaguely points out the culprit:
15742 getpeername(7, {sa_family=AF_INET, sin_port=htons(50440),
sin_addr=inet_addr("X.X.X>X")}, [16]) = 0
15742 write(2, "Bad arg length for Socket6::unpack_sockaddr_in6, length is 16, should be 28
at /usr/lib/perl5/site_perl/5.8.8/i686-linux/Socket6.pm line 282.\n", 142) = 142
I understand import('inet4') will fix it but I think it'd more desirous that
"working by default and blowing up in this circumstance only if they specifically
import('ipv6_only')"
would be better than the
"breaking the majority of the internet by defaulting to brokenness and require special
handling for the more common everyday uses to work"
make more sense.