From 036586379248920b1994da5cdb98f64b718c0b63 Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Mon, 13 Dec 2010 13:48:21 +0100 Subject: [PATCH] Import also getaddrinfo in SNMP_Session.pm --- mrtg-2.16.4-Socket6-fix.patch | 21 +++++---------------- mrtg.spec | 6 +++++- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/mrtg-2.16.4-Socket6-fix.patch b/mrtg-2.16.4-Socket6-fix.patch index 70c0b94..35833e1 100644 --- a/mrtg-2.16.4-Socket6-fix.patch +++ b/mrtg-2.16.4-Socket6-fix.patch @@ -1,23 +1,12 @@ -diff -up mrtg-2.16.4/bin/mrtg.BAD mrtg-2.16.4/bin/mrtg ---- mrtg-2.16.4/bin/mrtg.BAD 2010-11-22 09:13:33.713368000 -0500 -+++ mrtg-2.16.4/bin/mrtg 2010-11-22 09:14:10.503368001 -0500 -@@ -98,6 +98,7 @@ use locales_mrtg "0.07"; - BEGIN { - if (eval {local $SIG{__DIE__};require Socket6;}) { - import Socket; -+ use Socket(); - import Socket6 - } - } -diff -up mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.BAD mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm ---- mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.BAD 2010-11-22 09:12:52.934368000 -0500 -+++ mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm 2010-11-22 09:13:26.219368002 -0500 +diff -up mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.orig mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm +--- mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.orig 2010-05-17 15:59:20.000000000 +0200 ++++ mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm 2010-12-13 12:43:09.681833736 +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");}) { - import Socket6; -+ Socket6->import(qw(pack_sockaddr_in6 inet_pton)); ++ 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; } @@ -26,7 +15,7 @@ diff -up mrtg-2.16.4/lib/mrtg2/SNMP_Session.pm.BAD mrtg-2.16.4/lib/mrtg2/SNMP_Se if($SNMP_Session::ipv6available) { import IO::Socket::INET6; - import Socket6; -+ Socket6->import(qw(pack_sockaddr_in6 inet_pton)); ++ Socket6->import(qw(pack_sockaddr_in6 inet_pton getaddrinfo)); } } diff --git a/mrtg.spec b/mrtg.spec index f2d8af4..11778a6 100644 --- a/mrtg.spec +++ b/mrtg.spec @@ -6,7 +6,7 @@ Summary: Multi Router Traffic Grapher Name: mrtg Version: 2.16.4 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://oss.oetiker.ch/mrtg/ Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz Source1: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz.md5 @@ -121,6 +121,10 @@ rm -rf $RPM_BUILD_ROOT %dir %{_localstatedir}/lock/mrtg %changelog +* Mon Dec 13 2010 Vitezslav Crhonek - 2.16.4-3 +- Import also getaddrinfo in SNMP_Session.pm + Resolves: #662116 + * Mon Nov 22 2010 Tom "spot" Callaway - 2.16.4-2 - resolve conflict with Socket6 (see bz 438931, 442884, 652158)