Package: libio-socket-inet6-perl
Version: 2.65-1.1
Severity: normal

This is similar to #185244[1] but for libio-socket-inet6-perl. The
'resolving' via number does not work here despite the manpage says so.

----cut---------cut---------cut---------cut---------cut---------cut-----
               Proto       Protocol name (or number)    "tcp" | "udp" | ...
----cut---------cut---------cut---------cut---------cut---------cut-----

The following works for IO::Socket::INET if /etc/protocols is not
present on the system (see bugreport #185244):

perl -MIO::Socket::INET -e '$sock = IO::Socket::INET->new(LocalAddr => 
"0.0.0.0", LocalPort => 80, Proto => 6);'

works and stracing shows that /etc/protocols is not open. Even Proto
=> "tcp" will work here because of the resolution in [1].

Now trying the same for IO::Socket::INET6:

perl -MIO::Socket::INET6 -e '$sock = IO::Socket::INET6->new(LocalAddr => 
"0.0.0.0", LocalPort => 80, Proto => 6);'

gives

Use of uninitialized value in hash element at 
/usr/share/perl5/IO/Socket/INET6.pm line 171.
Use of uninitialized value in subroutine entry at 
/usr/share/perl5/IO/Socket/INET6.pm line 185.

and running under strace shows

open("/etc/protocols", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or 
directory)

 [1]: http://bugs.debian.org/185244

So we need either a Depends on netbase here or a similar
implementation (upstream) as for IO::Socket::INET6 where the protocol
numbers for tcp, udp and icmp are 'hardcoded', such that reading from
/etc/protocols is not needed?

Regards,
Salvatore

Attachment: signature.asc
Description: Digital signature

Reply via email to