Bug#730760: perl-base: IO::Socket::INET cannot cope with "option inet6" in /etc/resolv.conf

Dominic Hargreaves dom at earth.li
Wed Jan 1 16:40:50 UTC 2014


Control: severity -1 normal

On Fri, Nov 29, 2013 at 10:13:07AM +0000, Bob Ham wrote:
> When setting "option inet6" in /etc/resolv.conf, IO::Socket::INET
> cannot connect properly, particularly to popcon.debian.org:
> 
> $ perl -MIO::Socket::INET -e 'IO::Socket::INET->new("popcon.debian.org:80") or die "$@";'
> IO::Socket::INET: Bad hostname 'popcon.debian.org:80' at -e line 1.
> 
> When commenting out "option inet6", it works fine:
> 
> $ perl -MIO::Socket::INET -e 'IO::Socket::INET->new("popcon.debian.org:80") or die "$@";'
> $

I agree that this is a problem, but I'm not sure whether it's a reasonable
expectation for ipv4-only software to work with this option being set;
the manpage for resolv.conf does mention that breakage is to be expected.

A more pragmatic solution might be to use IO::Socket::IP instead.

Dominic.




More information about the Perl-maintainers mailing list