Blame SOURCES/mrtg-2.17.2-socket6-fix.patch

abc2a9
diff -up mrtg-2.17.7/bin/mrtg.orig mrtg-2.17.7/bin/mrtg
abc2a9
--- mrtg-2.17.7/bin/mrtg.orig	2018-08-08 13:09:59.682296406 +0200
abc2a9
+++ mrtg-2.17.7/bin/mrtg	2018-08-08 13:11:01.089173582 +0200
abc2a9
@@ -302,7 +302,7 @@ sub main {
abc2a9
     if ($cfg{enableipv6} eq 'yes') {
abc2a9
         if ( eval {local $SIG{__DIE__};require Socket; require Socket6; require IO::Socket::INET6;}) {
abc2a9
             import Socket;
abc2a9
-            import Socket6;
abc2a9
+            Socket6->import(qw(inet_pton getaddrinfo));
abc2a9
             debug('base', "IPv6 libraries found, IPv6 enabled.");
abc2a9
         } else {
abc2a9
             warn "$NOW: WARNING: IPv6 libraries not found, IPv6 disabled.\n";
abc2a9
diff -up mrtg-2.17.7/lib/mrtg2/SNMP_Session.pm.orig mrtg-2.17.7/lib/mrtg2/SNMP_Session.pm
abc2a9
--- mrtg-2.17.7/lib/mrtg2/SNMP_Session.pm.orig	2018-07-13 08:09:56.000000000 +0200
abc2a9
+++ mrtg-2.17.7/lib/mrtg2/SNMP_Session.pm	2018-08-08 13:13:15.361988807 +0200
abc2a9
@@ -146,7 +146,7 @@ BEGIN {
abc2a9
 
abc2a9
     if (eval {local $SIG{__DIE__};require Socket6;} &&
abc2a9
        eval {local $SIG{__DIE__};require IO::Socket::INET6; IO::Socket::INET6->VERSION("1.26");}) {
abc2a9
-       Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
abc2a9
+       Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
abc2a9
 	$ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(), "::1")));
abc2a9
 	$SNMP_Session::ipv6available = 1;
abc2a9
     }
abc2a9
@@ -601,7 +601,7 @@ use Carp;
abc2a9
 BEGIN {
abc2a9
     if($SNMP_Session::ipv6available) {
abc2a9
 	    import IO::Socket::INET6;
abc2a9
-        Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo));
abc2a9
+        Socket6->import(qw(inet_pton getaddrinfo inet_ntop));
abc2a9
     }
abc2a9
 }
abc2a9