clone 471036 -1
reassign -1 libwww-perl 5.808-1
retitle -1 libwww-perl: no IPv6 support
forwarded -1 http://rt.cpan.org/Public/Bug/Display.html?id=29468
thanks

On Sat, Mar 15, 2008 at 01:10:45PM +0100, Peter Eisentraut wrote:
> Package: perl
> Version: 5.8.8-12
> Severity: normal
> Tags: ipv6
> 
> I have set "options inet6" set in /etc/resolv.conf, and all the sudden a few
> Perl programs started segfaulting.  It is most easily reproducible with uscan.
> (debrelease is another example.)

First, uscan uses LWP, which doesn't support ipv6. It always uses
IO::Socket::INET, and bad things happen when it gets an IPv6 address to
connect to. I'm cloning a new bug against libwww-perl for this.

The Perl core side of this boils down to something like

perl -MSocket -e 'socket($s, PF_INET, SOCK_STREAM, 6) or die "socket: $!"; 
connect($s, sockaddr_in(80,inet_aton("ftp.fi.debian.org"))) or die "connect: 
$!";'

which crashes on i386 (but not on amd64) with Perl 5.8.8 when 
"options inet6" is set in /etc/resolv.conf.

On amd64 it doesn't crash but instead takes the low four octets of the
IPv6 address and uses them as an IPv4 one:

 connect(3, {sa_family=AF_INET, sin_port=htons(80), 
sin_addr=inet_addr("32.1.7.8")}, 16 <unfinished ...>

This is fixed in Perl 5.10.0, where inet_ntoa() returns undef with
"options inet6", and sockaddr_in() is better prepared for that:

 Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at 
/usr/lib/perl/5.10/Socket.pm line 214.

>From the changelog:

[ 31138] By: rgs                                   on 2007/05/04  14:02:26
        Log: Subject: [perl #42844] careless use of gethostbyname() in 
Socket.xs 
             From: [EMAIL PROTECTED] (via RT) <[EMAIL PROTECTED]>
             Date: Tue, 01 May 2007 09:17:22 -0700
             Message-ID: <[EMAIL PROTECTED]>
     Branch: perl
           ! ext/Socket/Socket.pm ext/Socket/Socket.xs

I'd suggest closing this at 5.10.0-1, but will leave that to the maintainer.

Cheers,
-- 
Niko Tyni   [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to