Package: libsnmp-session-perl
Version: 1.13-1
Severity: minor
Tags: upstream patch

Dear Maintainer,

New installation, ran mrtg (or rather, let it run from /etc/cron.d/mrtg), and 
it gives these errors:

Subroutine SNMP_Session::pack_sockaddr_in6 redefined at 
/usr/share/perl/5.14/Exporter.pm line 67.
 at /usr/share/perl5/SNMP_Session.pm line 149
Subroutine SNMP_Session::unpack_sockaddr_in6 redefined at 
/usr/share/perl/5.14/Exporter.pm line 67.
 at /usr/share/perl5/SNMP_Session.pm line 149
Subroutine SNMP_Session::sockaddr_in6 redefined at 
/usr/share/perl/5.14/Exporter.pm line 67.
 at /usr/share/perl5/SNMP_Session.pm line 149
Subroutine SNMPv1_Session::pack_sockaddr_in6 redefined at 
/usr/share/perl/5.14/Exporter.pm line 67.
 at /usr/share/perl5/SNMP_Session.pm line 608
Subroutine SNMPv1_Session::unpack_sockaddr_in6 redefined at 
/usr/share/perl/5.14/Exporter.pm line 67.
 at /usr/share/perl5/SNMP_Session.pm line 608
Subroutine SNMPv1_Session::sockaddr_in6 redefined at 
/usr/share/perl/5.14/Exporter.pm line 67.
 at /usr/share/perl5/SNMP_Session.pm line 608

Because it's run from a cron job every five minutes, the admin gets spammed 
this in his email.

Here's a patch for SNMP_Session.pm. It imports from Socket6 only those 
functions that it needs, rather than all of them.

--- SNMP_Session-1.13.orig/lib/SNMP_Session.pm  2013-09-23 11:05:39.000000000 
+0000
+++ SNMP_Session-1.13/lib/SNMP_Session.pm       2013-09-23 11:15:26.000000000 
+0000
@@ -146,7 +146,7 @@
 
     if (eval {local $SIG{__DIE__};require Socket6;} &&
        eval {local $SIG{__DIE__};require IO::Socket::INET6; 
IO::Socket::INET6->VERSION("1.26");}) {
-       import Socket6;
+       Socket6->import(qw(inet_pton getaddrinfo));
        $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), 
"::1")));
        $SNMP_Session::ipv6available = 1;
     }
@@ -605,7 +605,7 @@
 BEGIN {
     if($SNMP_Session::ipv6available) {
        import IO::Socket::INET6;
-       import Socket6;
+       Socket6->import(qw(inet_pton getaddrinfo));
     }
 }
 

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF8, LC_CTYPE=en_GB.UTF8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libsnmp-session-perl depends on:
ii  perl  5.14.2-21

Versions of packages libsnmp-session-perl recommends:
ii  libio-socket-inet6-perl  2.69-2
ii  libsocket6-perl          0.23-1+b2

libsnmp-session-perl suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to