mrtg/mrtg-2.17.2-socket6-fix.patch

34 lines
1.6 KiB
Diff
Raw Normal View History

2011-12-07 13:32:15 +00:00
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
2011-10-02 11:20:59 +00:00
@@ -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");}) {
2011-12-07 13:32:15 +00:00
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo unpack_sockaddr_in6));
+ Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
2011-10-02 11:20:59 +00:00
$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;
2011-12-07 13:32:15 +00:00
- Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo unpack_sockaddr_in6));
+ Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
2011-10-02 11:20:59 +00:00
}
}