On 03/06/2012 12:12 AM, Nick Price wrote:
I am running fedora 16 with all the updates available
Mrtg 2.17.4 was configured and installed manually.
I keep getting the following error in the log files
Subroutine SNMP_Session::pack_sockaddr_in6 redifined at
/usr/share/perl5/Exporter.pm line 67.
At /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 149
Subroutine SNMPv1_Session::pack_sockaddr_in6 redifined at
/usr/share/perl5/Exporter.pm line 67.
At /usr/local/mrtg-2/bin/../lib/mrtg2/SNMP_Session.pm line 604
Any ideas please.
Nick
_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Hi Nick,
mrtg-2.17.4 is available in Fedora Rawhide, you can download src rpm and
rebuild the package for Fedora 16, it will work fine.
Or see the attached patch.
Best regards,
Vitezslav Crhonek
diff -up mrtg-2.17.3/bin/mrtg.orig mrtg-2.17.3/bin/mrtg
--- mrtg-2.17.3/bin/mrtg.orig 2011-12-07 14:24:11.926747910 +0100
+++ mrtg-2.17.3/bin/mrtg 2011-12-07 14:25:33.522162313 +0100
@@ -300,7 +300,7 @@ sub main {
if ($cfg{enableipv6} eq 'yes') {
if ( eval {local $SIG{__DIE__};require Socket; require Socket6; require IO::Socket::INET6;}) {
import Socket;
- import Socket6;
+ Socket6->import(qw(inet_pton getaddrinfo));
debug('base', "IPv6 libraries found, IPv6 enabled.");
} else {
warn "$NOW: WARNING: IPv6 libraries not found, IPv6 disabled.\n";
diff -up mrtg-2.17.3/lib/mrtg2/SNMP_Session.pm.orig mrtg-2.17.3/lib/mrtg2/SNMP_Session.pm
--- mrtg-2.17.3/lib/mrtg2/SNMP_Session.pm.orig 2011-12-07 14:25:45.606223538 +0100
+++ mrtg-2.17.3/lib/mrtg2/SNMP_Session.pm 2011-12-07 14:27:21.593713162 +0100
@@ -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");}) {
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo unpack_sockaddr_in6));
+ Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
$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;
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo unpack_sockaddr_in6));
+ Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
}
}
_______________________________________________
mrtg mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg