#45 closed defect (fixed)
[patch] ERROR Subroutine SNMPv1_Session::AF_INET6
Reported by: | human | Owned by: | oetiker |
---|---|---|---|
Version: | 2.x | Keywords: | Subroutine SNMPv1_Session::AF_INET6 |
Cc: |
Description
When I run mrtg command
/usr/local/bin/mrtg /usr/local/etc/mrtg/server-01-mrtg.cfg
it give me error as below Subroutine SNMPv1_Session::AF_INET6 redefined at /usr/local/lib/perl5/5.8.8/Exporter.pm line 66. at /usr/local/lib/perl5/site_perl/5.8.8/SNMP_Session.pm line 594
Change History (9)
comment:1 Changed 13 years ago by human
comment:2 Changed 13 years ago by human
*grumble*, wiki formatting..
--- lib/mrtg2/SNMP_Session.pm.orig Tue Dec 22 12:49:07 2009 +++ lib/mrtg2/SNMP_Session.pm Tue Dec 22 12:50:27 2009 @@ -146,7 +146,7 @@ BEGIN { 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(pack_sockaddr_in6 inet_pton)); $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1"))); $SNMP_Session::ipv6available = 1; } @@ -601,7 +601,7 @@ use Carp; BEGIN { if($SNMP_Session::ipv6available) { import IO::Socket::INET6; - import Socket6; + Socket6->import(qw(pack_sockaddr_in6 inet_pton)); } }
comment:3 Changed 13 years ago by human
- Summary changed from ERROR Subroutine SNMPv1_Session::AF_INET6 to [patch] ERROR Subroutine SNMPv1_Session::AF_INET6
getaddrinfo must also be imported, add it to both Socket6->import lines in the diff.
comment:4 Changed 13 years ago by human
patch updated to add getaddrinfo.
--- SNMP_Session.pm.orig Mon May 17 14:59:20 2010 +++ SNMP_Session.pm Tue May 18 12:49:00 2010 @@ -146,7 +146,7 @@ BEGIN { 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(pack_sockaddr_in6 inet_pton getaddrinfo)); $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1"))); $SNMP_Session::ipv6available = 1; } @@ -601,7 +601,7 @@ use Carp; BEGIN { if($SNMP_Session::ipv6available) { import IO::Socket::INET6; - import Socket6; + Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo)); } }
comment:5 Changed 13 years ago by oetiker
- Owner changed from somebody to oetiker
thanks ... forwarded to simon leinen ... will integrate when he is ok with it.
comment:7 Changed 12 years ago by oetiker
fix is integrated in r330
comment:8 Changed 12 years ago by oetiker
- Resolution set to fixed
- Status changed from new to closed
comment:9 Changed 10 years ago by human
- Grosir Baju Batik
- Baju Batik Wanita
- Baju Batik Pria
- Baju Batik Modern
- Baju Batik Sarimbit
- Baju Batik Pasangan
- Baju Batik Muslim
- Baju Batik Couple
- Baju Batik Tulis
- Baju Batik Terbaru
- Baju Batik Remaja
- Baju Batik Pekalongan
- Baju Batik Couple
- Dokar Balap
- Jasa SEO Murah
- Berita Terkini
- Berita Terbaru
- Berita Hari Ini
- Berita Terupdate
- Kumpulan Berita
I think that's this one...
--- lib/mrtg2/SNMP_Session.pm.orig Tue Dec 22 12:49:07 2009 +++ lib/mrtg2/SNMP_Session.pm Tue Dec 22 12:50:27 2009 @@ -146,7 +146,7 @@ BEGIN {
+ Socket6->import(qw(pack_sockaddr_in6 inet_pton));
@@ -601,7 +601,7 @@ use Carp;
+ Socket6->import(qw(pack_sockaddr_in6 inet_pton));