head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.2 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.1.0.18 pkgsrc-2012Q4-base:1.1 pkgsrc-2012Q3:1.1.0.16 pkgsrc-2012Q3-base:1.1 pkgsrc-2012Q2:1.1.0.14 pkgsrc-2012Q2-base:1.1 pkgsrc-2012Q1:1.1.0.12 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.10 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.8 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.6 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.4 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.2 pkgsrc-2010Q4-base:1.1; locks; strict; comment @# @; 1.3 date 2013.03.17.00.15.29; author gdt; state dead; branches; next 1.2; 1.2 date 2013.01.11.13.34.46; author joerg; state Exp; branches; next 1.1; 1.1 date 2010.12.26.09.23.49; author sekiya; state Exp; branches; next ; desc @@ 1.3 log @Update to 5.7.2. This is a major update in terms of pkgsrc patches, of which there are far far too many. Analysis of patches was done by Karen Sirois of BBN, and I have remvoed patches that have been applied upstream. This builds fine and passes tests on NetBSD 6 i386. If you look after some other platform (Dragonfly, Darwin, FreeBSD, etc.), please make sure any problems are filed as upstream tickets; pkgsrc is not appropriate to carry patches long-term that should be fixed upstream, and this package has gotten out of hand. (OK by adam@@ to do the update, but he has not reviewed the changes, so errors are my fault. It's quite likely there are issues on other platforms.) Upstream NEWS: *5.7.2* snmp: - BUG: 3526549: CVE-2012-2141 Array index error leading to crash snmpd: - BUG: 3532090: Fix high ifIndex values crashing hrDeviceDescr building: - PATCH: 2091156: correctly declare dependencies in Makefile. 'make -j ' should work now. Backport this to V5-4 as it is needed for correct operation in the single threaded case of make miblib as well. Many other miscellaneous minor bug fixes *5.7.1* libnetsnmp: - Fixed the mib-parsing-bug introduced shortly before 5.7 agent: - fixed rounding errors for disk percentage calculations openbsd: - better support for recent openbsd releases features: - bug fixes with minimalist support after additional user feedback Many other miscellaneous minor bug fixes *5.7* snmpd: - Delivery of data via regularily scheduled notifications. (see "Data Delivery via Notfications" in snmpd.conf) - Many time-based config options can take (m)ins, (h)ours, ... arguments (see the snmpd.conf manual page) - The PING and TRACEROUTE MIBs now compile and work-ish on linux http://www.net-snmp.org/wiki/index.php/DISMAN - Mib handlers can now implement a data_clone function for cloning the myvoid structure variable to avoid dangling pointers - Fixed persistent storage of VACM MIB configuration - Multi-homed agents send UDP responses from the proper IP address - The hrStorageTable implementation now supports large filesystems better - optimizations for large route tables - Added a deliveryByNotify config token for regular data delivery (see the snmpd.conf manual page and the NET-SNMP-PERIODIC-NOTIFY-MIB) - [PATCH 3141462]: fix agentx subagent issues with multiple-object requests - [PATCH 3057093]: linux uses libpci for creating useful ifDescr strings - [PATCH 3131397]: huge speedups of the TCP/UDP Tables libnetsnmp: - Removed the older CMU compatibility support - The SSH transport is now configurable TLS/DTLS support: - The SNMP over DTLS transport now properly supports IPv6 - Introduced new configuration tokens: localCert/peerCert (deprecating serverCert, clientCert, defX509ServerPub, defX509ClientPub) - Various fixes for the TLS/DTLS transports apps: - Added a per-variable timed output support to snmpwalk using -CT - snmpinform now correctly uses the local engineID for informs - A number of mib2c bug fixes - New snmp.conf tokens for timeouts and retries building: - New flags to reduce the amount of compiled code to bare minimums. This is provided by a new generic feature marking/selection mechanism. http://www.net-snmp.org/wiki/index.php/Feature_Marking_and_Selection - It's now possible to build without SNMPv3/USM (e.g., if you only want TLS/DTLS with SNMPv3/TSM) - It's possible to build the suite with no SET support configure using --enable-read-only - It's possible to build the agent as a notify-only agent configure using --enable-notify-only - Added a script to test memory usage with various config options (see the local/minimalist/sizetests script) - Net-SNMP can now be built to perform local DNSSEC validation (install DNSSEC-Tools' libval and use --with-local-dnssec-validation) testing: - a number of new API unit-tests have been added to the suite (to run the tests: cd testing && ./RUNFULLTESTS -g unit-tests) - The unit tests can be more easily run under valgrind (See http://bit.ly/jsgRnv for details) openbsd: - Support for updating the routing table via SNMP win32: - The testing suite works better under win32 environments - Many building fixes for the win32 environment(s) solaris: - Net-SNMP now supports the SCTP-MIB DragonFlyBSD, FreeBSD8: - Net-SNMP should now work on DragonFlyBSD and FreeBSD8 And of course: - Many other bug fixes. See the CHANGES and ChangeLog for details. @ text @$NetBSD: patch-fd,v 1.2 2013/01/11 13:34:46 joerg Exp $ --- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2010-06-12 21:33:30.000000000 +0000 +++ agent/mibgroup/hardware/cpu/cpu_sysctl.c @@@@ -19,6 +19,9 @@@@ #else #include #endif +#if defined(__NetBSD__) +#include +#endif #include #include @@@@ -49,7 +52,11 @@@@ void init_cpu_sysctl( void ) { if ( n <= 0 ) n = 1; /* Single CPU system */ i = sizeof(descr); +#if defined(__NetBSD__) && ( defined(__i386__) || defined(__x86_64__) ) + sysctlbyname("machdep.cpu_brand", descr, (void *)&i, NULL, 0); +#else sysctl(model_mib, 2, descr, (void *)&i, NULL, 0); +#endif for ( i = 0; i < n; i++ ) { cpu = netsnmp_cpu_get_byIdx( i, 1 ); cpu->status = 2; /* running */ @@@@ -59,26 +66,22 @@@@ void init_cpu_sysctl( void ) { cpu_num = n; } - +#if defined(__NetBSD__) +#define NETSNMP_CPU_STATS uint64_t +#define NETSNMP_KERN_CPU KERN_CP_TIME +#else #define NETSNMP_CPU_STATS long #if defined(KERN_CPUSTATS) /* BSDi */ #define NETSNMP_KERN_CPU KERN_CPUSTATS #elif defined(KERN_CPTIME) /* OpenBSD */ #define NETSNMP_KERN_CPU KERN_CPTIME -#elif defined(KERN_CP_TIME) /* NetBSD */ -#define NETSNMP_KERN_CPU KERN_CP_TIME - -#if defined(netbsdelf3) -#undef NETSNMP_CPU_STATS -#define NETSNMP_CPU_STATS uint64_t -#endif - #elif defined(__FreeBSD__) #define NETSNMP_KERN_CPU 0 /* dummy value - sysctlnametomib(2) should be used */ #else #error "No CPU statistics sysctl token" #endif +#endif /* Need to check details before enabling this! @@@@ -159,7 +162,7 @@@@ int netsnmp_cpu_arch_load( netsnmp_cache size_t mem_size = sizeof(NETSNMP_VM_STATS_TYPE); netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 ); -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined (__NetBSD__) sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0); #else sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0); @ 1.2 log @Requires _KMEMUSER and uvm/uvm_extern.h on NetBSD/current. @ text @d1 1 a1 1 $NetBSD: patch-fd,v 1.1 2010/12/26 09:23:49 sekiya Exp $ @ 1.1 log @Pull memory statistics properly, and fix an overflow in the CPU statistics. ("netbsdelf3", indeed ... ) @ text @d1 1 a1 1 $NetBSD$ d3 13 a15 3 --- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2010-12-26 16:45:27.000000000 +0900 +++ agent/mibgroup/hardware/cpu/cpu_sysctl.c 2010-12-26 17:14:36.000000000 +0900 @@@@ -49,7 +49,11 @@@@ d27 1 a27 1 @@@@ -59,26 +63,22 @@@@ d59 1 a59 1 @@@@ -159,7 +159,7 @@@@ @