snmpd: - Change default AgentX target from 0.0.0.0:705 to localhost:705 - Fix CVE-2008-4309 (GETBULK issue reported by Oscar Mira-Sanchez) - Fix handling of multiple matching VACM entries (Use the "best" match, rather than the first one). Note that this could potentially affect the behaviour of existing access control configurations. - Latch large-disk statistics at 2Tb (rather than wrapping) Linux: - Fix build on modern distributions (using rpm-4.6) Windows: - Fix various builds (recent MSVC, MinGW, IPv6, winExtDLL)
39 lines
1 KiB
Text
39 lines
1 KiB
Text
$NetBSD: patch-ey,v 1.2 2010/07/20 08:33:44 adam Exp $
|
|
|
|
--- agent/mibgroup/mibII/tcp.c.orig 2009-11-13 12:59:26.000000000 +0000
|
|
+++ agent/mibgroup/mibII/tcp.c
|
|
@@ -167,6 +167,12 @@ init_tcp(void)
|
|
#define USES_SNMP_DESIGNED_TCPSTAT
|
|
#endif
|
|
|
|
+#ifdef netbsd4
|
|
+#define TCP_STAT_STRUCTURE struct tcp_mib
|
|
+#define USES_SNMP_DESIGNED_TCPSTAT
|
|
+#undef TCP_NSTATS
|
|
+#endif
|
|
+
|
|
#if defined (WIN32) || defined (cygwin)
|
|
#include <iphlpapi.h>
|
|
#define TCP_STAT_STRUCTURE MIB_TCPSTATS
|
|
@@ -689,6 +695,21 @@ tcp_load(netsnmp_cache *cache, void *vma
|
|
}
|
|
return ret_value;
|
|
}
|
|
+#elif defined(netbsd4)
|
|
+int
|
|
+tcp_load(netsnmp_cache *cache, void *vmagic)
|
|
+{
|
|
+ long ret_value = -1;
|
|
+
|
|
+ ret_value = netbsd_read_tcp_stat(&tcpstat);
|
|
+
|
|
+ if ( ret_value < 0 ) {
|
|
+ DEBUGMSGTL(("mibII/tcpScalar", "Failed to load TCP scalar Group (netbsd)\n"));
|
|
+ } else {
|
|
+ DEBUGMSGTL(("mibII/tcpScalar", "Loaded TCP scalar Group (netbsd)\n"));
|
|
+ }
|
|
+ return ret_value;
|
|
+}
|
|
#elif defined (WIN32) || defined (cygwin)
|
|
int
|
|
tcp_load(netsnmp_cache *cache, void *vmagic)
|