head 1.7; access; symbols pkgsrc-2013Q2:1.7.0.2 pkgsrc-2013Q2-base:1.7 pkgsrc-2012Q4:1.6.0.18 pkgsrc-2012Q4-base:1.6 pkgsrc-2012Q3:1.6.0.16 pkgsrc-2012Q3-base:1.6 pkgsrc-2012Q2:1.6.0.14 pkgsrc-2012Q2-base:1.6 pkgsrc-2012Q1:1.6.0.12 pkgsrc-2012Q1-base:1.6 pkgsrc-2011Q4:1.6.0.10 pkgsrc-2011Q4-base:1.6 pkgsrc-2011Q3:1.6.0.8 pkgsrc-2011Q3-base:1.6 pkgsrc-2011Q2:1.6.0.6 pkgsrc-2011Q2-base:1.6 pkgsrc-2011Q1:1.6.0.4 pkgsrc-2011Q1-base:1.6 pkgsrc-2010Q4:1.6.0.2 pkgsrc-2010Q4-base:1.6 pkgsrc-2010Q3:1.5.0.4 pkgsrc-2010Q3-base:1.5 pkgsrc-2010Q2:1.5.0.2 pkgsrc-2010Q2-base:1.5 pkgsrc-2010Q1:1.4.0.22 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.20 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.18 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.16 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.14 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.12 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.10 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.8 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.6 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.4 pkgsrc-2008Q1:1.4.0.2 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.3.0.28 pkgsrc-2007Q4-base:1.3 pkgsrc-2007Q3:1.3.0.26 pkgsrc-2007Q3-base:1.3 pkgsrc-2007Q2:1.3.0.24 pkgsrc-2007Q2-base:1.3 pkgsrc-2007Q1:1.3.0.22 pkgsrc-2007Q1-base:1.3 pkgsrc-2006Q4:1.3.0.20 pkgsrc-2006Q4-base:1.3 pkgsrc-2006Q3:1.3.0.18 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.16 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.14 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.12 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.10 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.8 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.6 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.4 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.2 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.2.0.2 pkgsrc-2004Q2-base:1.2; locks; strict; comment @# @; 1.7 date 2013.03.17.00.15.29; author gdt; state dead; branches; next 1.6; 1.6 date 2010.12.26.09.23.49; author sekiya; state Exp; branches; next 1.5; 1.5 date 2010.05.11.04.39.54; author adam; state Exp; branches; next 1.4; 1.4 date 2008.01.03.19.10.10; author seb; state Exp; branches; next 1.3; 1.3 date 2004.08.13.11.28.50; author adam; state dead; branches; next 1.2; 1.2 date 2004.05.14.13.30.34; author adam; state Exp; branches; next 1.1; 1.1 date 2004.04.26.17.39.00; author tron; state Exp; branches; next ; desc @@ 1.7 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-ah,v 1.6 2010/12/26 09:23:49 sekiya Exp $ --- agent/mibgroup/hardware/memory/memory_netbsd.c.orig 2006-03-07 01:23:52.000000000 +0900 +++ agent/mibgroup/hardware/memory/memory_netbsd.c 2010-12-26 17:50:43.000000000 +0900 @@@@ -4,7 +4,9 @@@@ #include #include +#include #include +#include #include #if defined(HAVE_UVM_UVM_PARAM_H) && defined(HAVE_UVM_UVM_EXTERN_H) @@@@ -30,27 +32,47 @@@@ long pagesize; struct uvmexp uvmexp; - int uvmexp_size = sizeof(uvmexp); - int uvmexp_mib[] = { CTL_VM, VM_UVMEXP }; + size_t uvmexp_size = sizeof(uvmexp); struct vmtotal total; size_t total_size = sizeof(total); - int total_mib[] = { CTL_VM, VM_METER }; - long phys_mem; - long user_mem; + quad_t phys_mem; + quad_t user_mem; + unsigned int bufspace; + unsigned int maxbufspace; size_t mem_size = sizeof(phys_mem); - int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM }; - int user_mem_mib[] = { CTL_HW, HW_USERMEM }; + size_t buf_size = sizeof(bufspace); /* * Retrieve the memory information from the underlying O/S... */ - sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0); - sysctl(total_mib, 2, &total, &total_size, NULL, 0); - sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0); - sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0); - pagesize = uvmexp.pagesize; + if (sysctlbyname("vm.uvmexp", &uvmexp, &uvmexp_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl vm.uvmexp failed (errno %d)\n", errno); + return -1; + } + if (sysctlbyname("vm.vmmeter", &total, &total_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl vm.vmmeter failed (errno %d)\n", errno); + return -1; + } + if (sysctlbyname("hw.physmem64", &phys_mem, &mem_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl hw.physmem64 failed (errno %d)\n", errno); + return -1; + } + if (sysctlbyname("hw.usermem64", &user_mem, &mem_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl hw.usermem64 failed (errno %d)\n", errno); + return -1; + } + if (sysctlbyname("vm.bufmem", &bufspace, &buf_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl vm.bufmem failed (errno %d)\n", errno); + return -1; + } + if (sysctlbyname("vm.bufmem_hiwater", &maxbufspace, &buf_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl vm.bufmem_hiwater failed (errno %d)\n", errno); + return -1; + } + + pagesize = sysconf(_SC_PAGESIZE); /* * ... and save this in a standard form. @@@@ -64,7 +86,6 @@@@ mem->units = pagesize; mem->size = phys_mem/pagesize; mem->free = total.t_free; - mem->other = -1; } mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_USERMEM, 1 ); @@@@ -76,7 +97,39 @@@@ mem->units = pagesize; mem->size = user_mem/pagesize; mem->free = uvmexp.free; - mem->other = -1; + } + + mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_VIRTMEM, 1 ); + if (!mem) { + snmp_log_perror("No Virtual Memory info entry"); + } else { + if (!mem->descr) + mem->descr = strdup("Virtual memory"); + mem->units = pagesize; + mem->size = total.t_vm; + mem->free = total.t_avm; + } + + mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SHARED, 1 ); + if (!mem) { + snmp_log_perror("No Shared Memory info entry"); + } else { + if (!mem->descr) + mem->descr = strdup("Shared virtual memory"); + mem->units = pagesize; + mem->size = total.t_vmshr; + mem->free = total.t_avmshr; + } + + mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_SHARED2, 1 ); + if (!mem) { + snmp_log_perror("No Shared2 Memory info entry"); + } else { + if (!mem->descr) + mem->descr = strdup("Shared real memory"); + mem->units = pagesize; + mem->size = total.t_rmshr; + mem->free = total.t_armshr; } #ifdef SWAP_NSWAP @@@@ -91,7 +144,17 @@@@ mem->units = pagesize; mem->size = uvmexp.swpages; mem->free = uvmexp.swpages - uvmexp.swpginuse; - mem->other = -1; + } + + mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_MBUF, 1 ); + if (!mem) { + snmp_log_perror("No Buffer, etc info entry"); + } else { + if (!mem->descr) + mem->descr = strdup("Memory buffers"); + mem->units = 1024; + mem->size = maxbufspace / 1024; + mem->free = (maxbufspace - bufspace)/1024; } return 0; @ 1.6 log @Pull memory statistics properly, and fix an overflow in the CPU statistics. ("netbsdelf3", indeed ... ) @ text @d1 1 a1 1 $NetBSD$ @ 1.5 log @Added patches, courtesy of Mike Bowie: * Address changes in sysctl() storage, which has yielded values such as IP-MIB::ipForwarding.0 invalid. * RAM reporting on 64-bit systems. @ text @d3 3 a5 3 --- agent/mibgroup/hardware/memory/memory_netbsd.c.orig 2006-03-06 16:23:52.000000000 +0000 +++ agent/mibgroup/hardware/memory/memory_netbsd.c 2010-04-21 21:58:02.000000000 +0000 @@@@ -4,6 +4,7 @@@@ d11 1 d14 2 a15 1 @@@@ -30,7 +31,7 @@@@ d20 1 a21 1 int uvmexp_mib[] = { CTL_VM, VM_UVMEXP }; d24 9 a32 3 @@@@ -40,16 +41,33 @@@@ long phys_mem; long user_mem; d34 3 a36 7 +#if defined(__x86_64__) + int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM64 }; + int user_mem_mib[] = { CTL_HW, HW_USERMEM64 }; +#else int phys_mem_mib[] = { CTL_HW, HW_PHYSMEM }; int user_mem_mib[] = { CTL_HW, HW_USERMEM }; +#endif d45 11 a55 2 + if (sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl VM_UVMEXP failed (errno %d)\n", errno); d58 2 a59 2 + if (sysctl(total_mib, 2, &total, &total_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl VM_METER failed (errno %d)\n", errno); d62 2 a63 2 + if (sysctl(phys_mem_mib, 2, &phys_mem, &mem_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl HW_PHYSMEM failed (errno %d)\n", errno); d66 2 a67 2 + if (sysctl(user_mem_mib, 2, &user_mem, &mem_size, NULL, 0) == -1) { + snmp_log(LOG_ERR, "sysctl HW_USERMEM failed (errno %d)\n", errno); d70 2 a71 1 pagesize = uvmexp.pagesize; d74 69 @ 1.4 log @Fix floating point exception on NetBSD/sparc64 by applying the same fix (and error checking) on agent/mibgroup/hardware/memory/memory_netbsd.c:netsnmp_mem_arch_load() via new patch file patch-ah as the one applied on agent/mibgroup/ucd-snmp/memory_netbsd1.c:var_extensible_mem() by patch file patch-es. Sorry I missed this in november 2006... Bump PKGREVISION to 1. @ text @d4 1 a4 1 +++ agent/mibgroup/hardware/memory/memory_netbsd.c d13 1 a13 1 @@@@ -30,7 +31,7 @@@@ int netsnmp_mem_arch_load( netsnmp_cache d22 12 a33 1 @@@@ -46,10 +47,22 @@@@ int netsnmp_mem_arch_load( netsnmp_cache @ 1.3 log @Changes 5.1.2: * Minor improvements to snmpdelta * Minor improvements to snmpnetstat (IPv6 output) * Fixes @ text @d1 1 a1 1 $NetBSD: patch-ah,v 1.2 2004/05/14 13:30:34 adam Exp $ d3 4 a6 5 --- agent/mibgroup/host/hr_filesys.c.orig 2004-01-29 13:53:59.000000000 +0000 +++ agent/mibgroup/host/hr_filesys.c @@@@ -86,6 +86,15 @@@@ struct mnttab *HRFS_entry = &HRFS_entry #define HRFS_type mnt_fstype #define HRFS_statfs statvfs d8 4 a11 14 +#elif defined(HAVE_STATVFS) && defined(__NetBSD__) + +static struct statvfs *fsstats = NULL; +struct statvfs *HRFS_entry; +static int fscount; +#define HRFS_mount f_mntonname +#define HRFS_name f_mntfromname +#define HRFS_statfs statvfs +#define HRFS_type f_fstypename #elif defined(HAVE_GETFSSTAT) static struct statfs *fsstats = 0; static int fscount; @@@@ -452,7 +461,9 @@@@ var_hrfilesys(struct variable *vp, return (u_char *) fsys_type_id; d13 36 a48 8 case HRFSYS_ACCESS: -#if HAVE_GETFSSTAT +#if defined(HAVE_STATVFS) && defined(__NetBSD__) + long_return = HRFS_entry->f_flag & MNT_RDONLY ? 2 : 1; +#elif defined(HAVE_GETFSSTAT) long_return = HRFS_entry->f_flags & MNT_RDONLY ? 2 : 1; #elif defined(cygwin) long_return = 1; @ 1.2 log @Changes 5.1.1: New: - test suite supports testing over other transports (tcp, udp6, unix, ...) (see the -P switch to the testing/RUNTESTS script) - Solaris supports the use of it's PKCS#11 library for supporting cryptographic functions (OpenSSL isn't required if PKCS#11 is available) (see configure's --with-pkcs flag) Fixes: - Improvements on 64 bit architectures. - A few minor memory leaks fixed. - An extremely large number of minor bug fixes. - Many perl module specific bug fixes. - snmpd will safely handle more signals. Ports: - Many many significant Windows improvements. - A win32 build script in win32/build.pl - Support for the MinGW compiler - (see the README.win32 file for details on new ports) - Various helpful win32/*.bat files for installation, etc. - Some linux 2.6 support improvements @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Make this build under NetBSD 2.0D and above with statvfs(2). @ text @d3 3 a5 3 --- agent/mibgroup/host/hr_filesys.c.orig 2003-02-28 19:17:35.000000000 +0100 +++ agent/mibgroup/host/hr_filesys.c 2004-04-26 19:31:03.000000000 +0200 @@@@ -85,6 +85,15 @@@@ d21 1 a21 1 @@@@ -447,7 +456,9 @@@@ @