On Tue 2009.12.22 at 12:55 +0100, Giovanni Bechis wrote:
> Stuart Henderson wrote:
> >On 2009/12/14 00:39, Stuart Henderson wrote:
> >>since the Net::SNMP update I'm seeing this when MRTG starts up.
> >>it seems to still work, but any ideas what's up or if it's important?
> >
> >unless this can get fixed quickly I'd like to revert it. any ok's?
> >
> This diff (from Fedora 9 Rpm) fixes the warnings, ok ?
> http://koji.fedoraproject.org/koji/buildinfo?buildID=46559
> Cheers
> Giovanni
unfortunately, this doesn't quite fix it for us; our mrtg port doesn't
use the mrtg included SNMP_Session, but rather net/p5-SNMP_Session.
however, the patch is still valid over there.
this resolves the warnings with mrtg; smokeping seems to be uneffected,
but someone using snmp with smokeping could futher validate this.
cheers,
okan
Index: Makefile
===================================================================
RCS file: /home/open/anoncvs/cvs/ports/net/p5-SNMP_Session/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile 13 Dec 2009 23:47:51 -0000 1.11
+++ Makefile 9 Jan 2010 04:27:03 -0000
@@ -4,6 +4,7 @@ COMMENT= provides rudimentary access to
MODULES= cpan
DISTNAME= SNMP_Session-1.13
+PKGNAME= p5-${DISTNAME}p0
CATEGORIES= net
HOMEPAGE= http://code.google.com/p/snmp-session/
Index: patches/patch-lib_SNMP_Session_pm
===================================================================
RCS file: patches/patch-lib_SNMP_Session_pm
diff -N patches/patch-lib_SNMP_Session_pm
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_SNMP_Session_pm 9 Jan 2010 04:24:57 -0000
@@ -0,0 +1,21 @@
+$OpenBSD$
+--- lib/SNMP_Session.pm.orig Fri Jan 8 23:23:52 2010
++++ lib/SNMP_Session.pm Fri Jan 8 23:24:48 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));
+ $ipv6_addr_len = length(pack_sockaddr_in6(161, inet_pton(AF_INET6(),
"::1")));
+ $SNMP_Session::ipv6available = 1;
+ }
+@@ -605,7 +605,7 @@ use Carp;
+ BEGIN {
+ if($SNMP_Session::ipv6available) {
+ import IO::Socket::INET6;
+- import Socket6;
++ Socket6->import(qw(pack_sockaddr_in6 inet_pton));
+ }
+ }
+