pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net
Module Name: pkgsrc
Committed By: adam
Date: Tue Oct 18 12:01:53 UTC 2022
Modified Files:
pkgsrc/net/net-snmp: Makefile Makefile.common PLIST builtin.mk distinfo
pkgsrc/net/net-snmp/patches:
patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
patch-agent_mibgroup_host_data__access_swrun__kinfo.c
patch-agent_mibgroup_kernel__sunos5.c
patch-agent_mibgroup_mibII_udpTable.c patch-configure
pkgsrc/net/py-netsnmp: Makefile
Added Files:
pkgsrc/net/net-snmp/patches: patch-agent_auto__nlist.c
patch-agent_mibgroup_hardware_memory_memory__freebsd.c
patch-agent_mibgroup_host_hr__storage.c
patch-agent_mibgroup_host_hr__swrun.c
patch-agent_mibgroup_if-mib_data__access_interface.h
patch-agent_mibgroup_mibII_icmp.c
patch-agent_mibgroup_mibII_interfaces.c
patch-agent_mibgroup_mibII_ip.c patch-agent_mibgroup_mibII_tcp.c
patch-agent_mibgroup_mibII_udp.c
patch-agent_mibgroup_mibII_var__route.c
patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c patch-ov_UCD-fields
patch-ov_oid__to__type.in patch-perl_OID_OID.xs
Removed Files:
pkgsrc/net/net-snmp/patches: patch-ag
patch-agent_mibgroup_hardware_fsys_fsys_getfsstats.c
patch-agent_mibgroup_var__route.c patch-ai patch-aj patch-ak
patch-am patch-ap patch-aq patch-da patch-db patch-dl patch-dt
patch-du patch-el patch-es
patch-snmplib_transports_snmpUDPBaseDomain.c
Log Message:
net-snmp py-netsnmp: updated to 5.9.3
*5.9.3*:
security:
- These two CVEs can be exploited by a user with read-only credentials:
- CVE-2022-24805 A buffer overflow in the handling of the INDEX of
NET-SNMP-VACM-MIB can cause an out-of-bounds memory access.
- CVE-2022-24809 A malformed OID in a GET-NEXT to the nsVacmAccessTable
can cause a NULL pointer dereference.
- These CVEs can be exploited by a user with read-write credentials:
- CVE-2022-24806 Improper Input Validation when SETing malformed
OIDs in master agent and subagent simultaneously
- CVE-2022-24807 A malformed OID in a SET request to
SNMP-VIEW-BASED-ACM-MIB::vacmAccessTable can cause an
out-of-bounds memory access.
- CVE-2022-24808 A malformed OID in a SET request to
NET-SNMP-AGENT-MIB::nsLogTable can cause a NULL pointer dereference
- CVE-2022-24810 A malformed OID in a SET to the nsVacmAccessTable
can cause a NULL pointer dereference.
- To avoid these flaws, use strong SNMPv3 credentials and do not share them.
If you must use SNMPv1 or SNMPv2c, use a complex community string
and enhance the protection by restricting access to a given IP address range.
- Thanks are due to Yu Zhang of VARAS@IIE and Nanyu Zhong of VARAS@IIE for
reporting the following CVEs that have been fixed in this release, and
to Arista Networks for providing fixes.
misc:
- Snmp-create-v3-user: Fix the snmpd.conf path @datadir@ is
expanded in ${datarootdir} so datarootdir must be set before
@datadir@ is used.
general: Many bug fixes
*5.9.2*:
skipped due to a last minute library versioning found bug -- use 5.9.3 instead
*5.9.1*:
General: Many bug fixes
*5.9*
snmplib:
- Add IPv6 support to DTLSUDP transport CHANGES: snmplib: use new
netsnmp_sockaddr_storage in netsnmp_addr_pair CHANGES: snmplib: add
base_transport ptr for tunneled transports
snmpd:
- Security vulnerabilty in the ping MIB reported by Christopher Ertl
from Microsoft fixed
- Changing to a different uid/gid can only be done once
- The extend mib is now read-only by default
snmptrap:
- BUG: 2899: Patch from Drew Roedersheimer to set library
engineboots/time values before sending
unspecified:
- Add pkg-config support for building applications and sub-agents Use
the netsnmp package when building Net-SNMP applications. Use the
netsnmp-agent package when building Net-SNMP subagents.
To generate a diff of this commit:
cvs rdiff -u -r1.138 -r1.139 pkgsrc/net/net-snmp/Makefile
cvs rdiff -u -r1.6 -r1.7 pkgsrc/net/net-snmp/Makefile.common
cvs rdiff -u -r1.29 -r1.30 pkgsrc/net/net-snmp/PLIST
cvs rdiff -u -r1.2 -r1.3 pkgsrc/net/net-snmp/builtin.mk
cvs rdiff -u -r1.99 -r1.100 pkgsrc/net/net-snmp/distinfo
cvs rdiff -u -r1.12 -r0 pkgsrc/net/net-snmp/patches/patch-ag
cvs rdiff -u -r0 -r1.1 pkgsrc/net/net-snmp/patches/patch-agent_auto__nlist.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_memory_memory__freebsd.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__storage.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__swrun.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_if-mib_data__access_interface.h \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_icmp.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_interfaces.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_ip.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcp.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udp.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_var__route.c \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c \
pkgsrc/net/net-snmp/patches/patch-ov_UCD-fields \
pkgsrc/net/net-snmp/patches/patch-ov_oid__to__type.in \
pkgsrc/net/net-snmp/patches/patch-perl_OID_OID.xs
cvs rdiff -u -r1.7 -r1.8 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
cvs rdiff -u -r1.2 -r0 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_fsys_fsys_getfsstats.c \
pkgsrc/net/net-snmp/patches/patch-da pkgsrc/net/net-snmp/patches/patch-db
cvs rdiff -u -r1.4 -r1.5 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__kinfo.c
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c \
pkgsrc/net/net-snmp/patches/patch-configure
cvs rdiff -u -r1.1 -r0 \
pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_var__route.c \
pkgsrc/net/net-snmp/patches/patch-snmplib_transports_snmpUDPBaseDomain.c
cvs rdiff -u -r1.7 -r0 pkgsrc/net/net-snmp/patches/patch-ai \
pkgsrc/net/net-snmp/patches/patch-aj
cvs rdiff -u -r1.6 -r0 pkgsrc/net/net-snmp/patches/patch-ak \
pkgsrc/net/net-snmp/patches/patch-dl
cvs rdiff -u -r1.14 -r0 pkgsrc/net/net-snmp/patches/patch-am
cvs rdiff -u -r1.3 -r0 pkgsrc/net/net-snmp/patches/patch-ap \
pkgsrc/net/net-snmp/patches/patch-aq pkgsrc/net/net-snmp/patches/patch-es
cvs rdiff -u -r1.10 -r0 pkgsrc/net/net-snmp/patches/patch-dt
cvs rdiff -u -r1.4 -r0 pkgsrc/net/net-snmp/patches/patch-du
cvs rdiff -u -r1.5 -r0 pkgsrc/net/net-snmp/patches/patch-el
cvs rdiff -u -r1.10 -r1.11 pkgsrc/net/py-netsnmp/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/net-snmp/Makefile
diff -u pkgsrc/net/net-snmp/Makefile:1.138 pkgsrc/net/net-snmp/Makefile:1.139
--- pkgsrc/net/net-snmp/Makefile:1.138 Tue Jun 28 11:35:04 2022
+++ pkgsrc/net/net-snmp/Makefile Tue Oct 18 12:01:52 2022
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.138 2022/06/28 11:35:04 wiz Exp $
+# $NetBSD: Makefile,v 1.139 2022/10/18 12:01:52 adam Exp $
-PKGREVISION= 4
.include "Makefile.common"
CATEGORIES= net
@@ -68,6 +67,8 @@ CONFIGURE_ARGS+= --with-persistent-direc
CONFIGURE_ARGS+= --with-mibdirs=${NET_SNMP_MIBDIRS:Q}
.endif
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
+CONFIGURE_ARGS+= --with-mib-modules="smux host ucd-snmp/diskio mibII/kernel_netbsd"
+.elif ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --with-mib-modules="smux host ucd-snmp/diskio"
.else
CONFIGURE_ARGS+= --with-mib-modules="smux host"
@@ -94,12 +95,6 @@ CONFIGURE_ARGS+= --with-dummy-values
#
CONFIGURE_ARGS+= --enable-ucd-snmp-compatibility
-CFLAGS.Darwin+= -framework ApplicationServices
-CFLAGS.Darwin+= -framework CoreFoundation
-CFLAGS.Darwin+= -framework CoreServices
-CFLAGS.Darwin+= -framework DiskArbitration
-CFLAGS.Darwin+= -framework IOKit
-
# Handle ${PREFIX}/share/snmp in the DEINSTALL script since it may contain
# leftover config files or pidfiles after deinstallation.
#
@@ -109,21 +104,12 @@ SMF_NAME= snmp
SMF_INSTANCES= default snmptrapd
USE_TOOLS+= sh:run
-REPLACE_INTERPRETER+= bash
-REPLACE.bash.old= /bin/bash
-REPLACE.bash.new= ${SH}
-REPLACE_FILES.bash= local/mib2c-update
INSTALLATION_DIRS+= share/examples/net-snmp
post-extract:
.if ${OPSYS} == "DragonFly"
- cp ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c
-.elif ${OPSYS} == "Darwin"
- ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin18.h
- ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin19.h
- ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin20.h
- ${LN} -s ${WRKSRC}/include/net-snmp/system/darwin17.h ${WRKSRC}/include/net-snmp/system/darwin21.h
+ ${CP} ${FILESDIR}/cpu_dragonfly.c ${WRKSRC}/agent/mibgroup/hardware/cpu/cpu_nlist.c
.endif
post-wrapper:
Index: pkgsrc/net/net-snmp/Makefile.common
diff -u pkgsrc/net/net-snmp/Makefile.common:1.6 pkgsrc/net/net-snmp/Makefile.common:1.7
--- pkgsrc/net/net-snmp/Makefile.common:1.6 Fri Jun 12 02:22:07 2020
+++ pkgsrc/net/net-snmp/Makefile.common Tue Oct 18 12:01:52 2022
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.common,v 1.6 2020/06/12 02:22:07 sevan Exp $
+# $NetBSD: Makefile.common,v 1.7 2022/10/18 12:01:52 adam Exp $
# used by net/net-snmp/Makefile
# used by net/py-netsnmp/Makefile
-DISTNAME= net-snmp-5.8
+DISTNAME= net-snmp-5.9.3
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
HOMEPAGE= http://www.net-snmp.org/
Index: pkgsrc/net/net-snmp/PLIST
diff -u pkgsrc/net/net-snmp/PLIST:1.29 pkgsrc/net/net-snmp/PLIST:1.30
--- pkgsrc/net/net-snmp/PLIST:1.29 Fri Aug 5 10:55:01 2022
+++ pkgsrc/net/net-snmp/PLIST Tue Oct 18 12:01:52 2022
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.29 2022/08/05 10:55:01 adam Exp $
+@comment $NetBSD: PLIST,v 1.30 2022/10/18 12:01:52 adam Exp $
bin/agentxtrap
${PLIST.perl}bin/checkbandwidth
bin/encode_keychange
@@ -102,7 +102,6 @@ include/net-snmp/library/container_null.
include/net-snmp/library/data_list.h
include/net-snmp/library/default_store.h
include/net-snmp/library/dir_utils.h
-include/net-snmp/library/factory.h
include/net-snmp/library/fd_event_manager.h
include/net-snmp/library/file_utils.h
include/net-snmp/library/getopt.h
@@ -123,6 +122,7 @@ include/net-snmp/library/snmp-tc.h
include/net-snmp/library/snmp.h
include/net-snmp/library/snmpAliasDomain.h
include/net-snmp/library/snmpCallbackDomain.h
+include/net-snmp/library/snmpIPBaseDomain.h
include/net-snmp/library/snmpIPv4BaseDomain.h
${PLIST.inet6}include/net-snmp/library/snmpIPv6BaseDomain.h
include/net-snmp/library/snmpSocketBaseDomain.h
@@ -174,23 +174,14 @@ include/net-snmp/system/bsdi3.h
include/net-snmp/system/bsdi4.h
include/net-snmp/system/cygwin.h
include/net-snmp/system/darwin.h
-include/net-snmp/system/darwin10.h
-include/net-snmp/system/darwin11.h
-include/net-snmp/system/darwin12.h
-include/net-snmp/system/darwin13.h
-include/net-snmp/system/darwin14.h
-include/net-snmp/system/darwin15.h
-include/net-snmp/system/darwin16.h
-include/net-snmp/system/darwin17.h
-include/net-snmp/system/darwin7.h
-include/net-snmp/system/darwin8.h
-include/net-snmp/system/darwin9.h
include/net-snmp/system/dragonfly.h
include/net-snmp/system/dynix.h
include/net-snmp/system/freebsd.h
include/net-snmp/system/freebsd10.h
include/net-snmp/system/freebsd11.h
include/net-snmp/system/freebsd12.h
+include/net-snmp/system/freebsd13.h
+include/net-snmp/system/freebsd14.h
include/net-snmp/system/freebsd2.h
include/net-snmp/system/freebsd3.h
include/net-snmp/system/freebsd4.h
@@ -274,6 +265,8 @@ lib/libnetsnmphelpers.la
lib/libnetsnmpmibs.la
lib/libnetsnmptrapd.la
lib/libsnmp.la
+lib/pkgconfig/netsnmp-agent.pc
+lib/pkgconfig/netsnmp.pc
man/man1/agentxtrap.1
man/man1/encode_keychange.1
man/man1/fixproc.1
Index: pkgsrc/net/net-snmp/builtin.mk
diff -u pkgsrc/net/net-snmp/builtin.mk:1.2 pkgsrc/net/net-snmp/builtin.mk:1.3
--- pkgsrc/net/net-snmp/builtin.mk:1.2 Sun Nov 3 11:45:44 2019
+++ pkgsrc/net/net-snmp/builtin.mk Tue Oct 18 12:01:52 2022
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.2 2019/11/03 11:45:44 rillig Exp $
+# $NetBSD: builtin.mk,v 1.3 2022/10/18 12:01:52 adam Exp $
BUILTIN_PKG:= net-snmp
@@ -52,7 +52,7 @@ USE_BUILTIN.net-snmp= yes
. for _dep_ in ${BUILDLINK_API_DEPENDS.net-snmp}
. if !empty(USE_BUILTIN.net-snmp:M[yY][eE][sS])
USE_BUILTIN.net-snmp!= \
- if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.net-snmp:Q}; then \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.net-snmp}; then \
${ECHO} yes; \
else \
${ECHO} no; \
Index: pkgsrc/net/net-snmp/distinfo
diff -u pkgsrc/net/net-snmp/distinfo:1.99 pkgsrc/net/net-snmp/distinfo:1.100
--- pkgsrc/net/net-snmp/distinfo:1.99 Fri Aug 5 10:55:01 2022
+++ pkgsrc/net/net-snmp/distinfo Tue Oct 18 12:01:52 2022
@@ -1,33 +1,30 @@
-$NetBSD: distinfo,v 1.99 2022/08/05 10:55:01 adam Exp $
+$NetBSD: distinfo,v 1.100 2022/10/18 12:01:52 adam Exp $
-BLAKE2s (net-snmp-5.8.tar.gz) = 3baf340de546040278255692e48b57bab2bbfb595572bcd814fb53be3fd6f65c
-SHA512 (net-snmp-5.8.tar.gz) = 27895a583b23f3e14c48562bc32f3ba83513d81aa848e878be9a3650f0458d45950635c937ef627135f80b757b663e71fab9a3bde4fd91889153998ae3468fe7
-Size (net-snmp-5.8.tar.gz) = 6591680 bytes
-SHA1 (patch-ac) = fa5a32e497a7651f4804082d921bb2e91b17d098
-SHA1 (patch-ag) = d9595eceeb5ee986ab4365f62e3c3ab339e605aa
-SHA1 (patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c) = d36d2490448c2dfda0383c67deb36fdb31ff18a3
-SHA1 (patch-agent_mibgroup_hardware_fsys_fsys_getfsstats.c) = cee9722d9a3f956726a8760b900ed3a375afde3f
+BLAKE2s (net-snmp-5.9.3.tar.gz) = c5f3e30c73294c0f8b7db2a776a0a28e6f63ed1d55f32acb4328fbbb277cbe4a
+SHA512 (net-snmp-5.9.3.tar.gz) = a476df4967029a2eb03d27b0e250170785d0a8c143d49b900ee958c3cbdfaccd415b70af40f6fbed9cb8819d522c35a6073a431091d908ccc7c018fa0aaa2abc
+Size (net-snmp-5.9.3.tar.gz) = 6646950 bytes
+SHA1 (patch-agent_auto__nlist.c) = a8fe703d8902c2847ca6692af4400ddbf9cbe74b
+SHA1 (patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c) = 22fd0b95e06117fd8f59bd0112b2c91e40d61e70
+SHA1 (patch-agent_mibgroup_hardware_memory_memory__freebsd.c) = 51d2c7e11b3d422e57ea2f5761aff624f7333842
SHA1 (patch-agent_mibgroup_hardware_memory_memory__netbsd.c) = 928a5aa99e7893ee91dea3110db8098212e328fa
-SHA1 (patch-agent_mibgroup_host_data__access_swrun__kinfo.c) = 39888f6489b89bd6598c453977b29519b2f7968f
-SHA1 (patch-agent_mibgroup_kernel__sunos5.c) = 3e345f92f42a47959716b0176096c6b0d91aa65a
+SHA1 (patch-agent_mibgroup_host_data__access_swrun__kinfo.c) = f983ae0d99d85ab1ac6dc7cf2d2c0415b6935258
+SHA1 (patch-agent_mibgroup_host_hr__storage.c) = d9595eceeb5ee986ab4365f62e3c3ab339e605aa
+SHA1 (patch-agent_mibgroup_host_hr__swrun.c) = d01e8a93f6e766cedfdc324efd69168f71aac76f
+SHA1 (patch-agent_mibgroup_if-mib_data__access_interface.h) = f888d65ec32020dc75d60d5d67ec54614d934489
+SHA1 (patch-agent_mibgroup_kernel__sunos5.c) = e1cfb194ec2ef784ae8bdf1ff3537edc9b30b66c
SHA1 (patch-agent_mibgroup_kernel__sunos5.h) = eb80eb5e55020014b1e5524fd572839aefdce5a5
+SHA1 (patch-agent_mibgroup_mibII_icmp.c) = 50ac67db8a9ffc16d983b4192e74db25ef439321
+SHA1 (patch-agent_mibgroup_mibII_interfaces.c) = 44a4ce6302457094ba2b200e4c47ff6c2a425746
+SHA1 (patch-agent_mibgroup_mibII_ip.c) = 04c2a487bad8705c9725ef4a62016051d3898970
SHA1 (patch-agent_mibgroup_mibII_ipAddr.c) = cd3345a4b30fe2280d0555ee38feb5f957a55b1e
+SHA1 (patch-agent_mibgroup_mibII_tcp.c) = 92563fd6be6f27be5b348cdc8bc02061374026b0
SHA1 (patch-agent_mibgroup_mibII_tcpTable.c) = acea4fdb55622df9ed0a45051412de278695c9da
-SHA1 (patch-agent_mibgroup_mibII_udpTable.c) = 7726d27a52a03c16bd220530ddb41b896cfec089
-SHA1 (patch-agent_mibgroup_var__route.c) = 919348e62849367793e4abf7d608d9824eb8ff2d
+SHA1 (patch-agent_mibgroup_mibII_udp.c) = d110e996d0538d17251d39a5eed46df6944ba0fa
+SHA1 (patch-agent_mibgroup_mibII_udpTable.c) = 7672f7df9c8f6540987895e784b85de1e7cebf5e
+SHA1 (patch-agent_mibgroup_mibII_var__route.c) = 919348e62849367793e4abf7d608d9824eb8ff2d
+SHA1 (patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c) = 7336d905bac315f344f93664e4118332f88fb6ee
SHA1 (patch-agent_snmp__perl.c) = 893cf46624d4f26941b3911a64c752c110ba6ef8
-SHA1 (patch-ai) = 04c2a487bad8705c9725ef4a62016051d3898970
-SHA1 (patch-aj) = d110e996d0538d17251d39a5eed46df6944ba0fa
-SHA1 (patch-ak) = 50ac67db8a9ffc16d983b4192e74db25ef439321
-SHA1 (patch-am) = d01e8a93f6e766cedfdc324efd69168f71aac76f
-SHA1 (patch-ap) = 44a4ce6302457094ba2b200e4c47ff6c2a425746
-SHA1 (patch-aq) = a8fe703d8902c2847ca6692af4400ddbf9cbe74b
-SHA1 (patch-configure) = 7dd273e74c2d0a4cfc90398ba7804e0416d6f4f1
-SHA1 (patch-da) = 40e8d78bad93ca12f4c08c43b86e7f13edafc299
-SHA1 (patch-db) = 281be9a88860987880c71770f4050fd965dd8ed9
-SHA1 (patch-dl) = 92563fd6be6f27be5b348cdc8bc02061374026b0
-SHA1 (patch-dt) = 452fee78b37f8ce0eb30049f9f18b04cff9b6e6e
-SHA1 (patch-du) = 51d2c7e11b3d422e57ea2f5761aff624f7333842
-SHA1 (patch-el) = b23d7ae82d367d457181d231a56c80e648b0ee6e
-SHA1 (patch-es) = 7336d905bac315f344f93664e4118332f88fb6ee
-SHA1 (patch-snmplib_transports_snmpUDPBaseDomain.c) = a7eec599e1cfb2fbd22d0dd53412727b5ff1825d
+SHA1 (patch-configure) = 26012c2d7e22b01db3ab3a6d7d959645185065bb
+SHA1 (patch-ov_UCD-fields) = 40e8d78bad93ca12f4c08c43b86e7f13edafc299
+SHA1 (patch-ov_oid__to__type.in) = 281be9a88860987880c71770f4050fd965dd8ed9
+SHA1 (patch-perl_OID_OID.xs) = b23d7ae82d367d457181d231a56c80e648b0ee6e
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
diff -u pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c:1.7 pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c:1.8
--- pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c:1.7 Fri Oct 6 02:39:38 2017
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c Tue Oct 18 12:01:52 2022
@@ -1,6 +1,6 @@
-$NetBSD: patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c,v 1.7 2017/10/06 02:39:38 gavan Exp $
+$NetBSD: patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c,v 1.8 2022/10/18 12:01:52 adam Exp $
---- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2014-12-08 20:23:22.000000000 +0000
+--- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig 2022-07-13 21:14:14.000000000 +0000
+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c
@@ -10,6 +10,7 @@
@@ -9,7 +9,7 @@ $NetBSD: patch-agent_mibgroup_hardware_c
+#include <errno.h>
#include <sys/types.h>
- #if defined(__FreeBSD__)
+ #if defined(freebsd3)
@@ -24,6 +25,9 @@
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -20,7 +20,7 @@ $NetBSD: patch-agent_mibgroup_hardware_c
#ifdef HAVE_VM_VM_PARAM_H
#include <vm/vm_param.h>
#endif
-@@ -43,7 +47,7 @@ void init_cpu_sysctl( void ) {
+@@ -46,7 +50,7 @@ void init_cpu_sysctl( void ) {
int i, n;
size_t siz;
int ncpu_mib[] = { CTL_HW, HW_NCPU };
@@ -29,29 +29,7 @@ $NetBSD: patch-agent_mibgroup_hardware_c
int model_mib[] = { CTL_HW, HW_MODEL };
#endif
char descr[ SNMP_MAXBUF ];
-@@ -51,14 +55,17 @@ void init_cpu_sysctl( void ) {
- strcpy(cpu->name, "Overall CPU statistics");
-
- siz = sizeof(n);
-- sysctl(ncpu_mib, 2, &n, &siz, NULL, 0);
-+ if (sysctl(ncpu_mib, 2, &n, &siz, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl hw.ncpu failed (errno %d)\n", errno);
- if ( n <= 0 )
- n = 1; /* Single CPU system */
- siz = sizeof(descr);
--#if defined(__NetBSD__) && ( defined(__i386__) || defined(__x86_64__) )
-- sysctlbyname("machdep.cpu_brand", descr, &siz, NULL, 0);
-+#if defined(__FreeBSD__) && ( defined(__i386__) || defined(__x86_64__) )
-+ if (sysctlbyname("machdep.cpu_brand", descr, &siz, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl machdep.cpu_brand failed (errno %d)\n", errno)
- #else
-- sysctl(model_mib, 2, descr, &siz, NULL, 0);
-+ if (sysctl(model_mib, 2, descr, &siz, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl hw.model failed (errno %d)\n", errno);
- #endif
- for ( i = 0; i < n; i++ ) {
- cpu = netsnmp_cpu_get_byIdx( i, 1 );
-@@ -158,7 +165,7 @@
+@@ -174,7 +178,7 @@ struct __vmmeter {
/*
* Load the latest CPU usage statistics
*/
@@ -60,31 +38,7 @@ $NetBSD: patch-agent_mibgroup_hardware_c
/*
* Strictly speaking, BSDi ought to use
-@@ -190,9 +197,11 @@ int netsnmp_cpu_arch_load( netsnmp_cache
- netsnmp_cpu_info *cpu = netsnmp_cpu_get_byIdx( -1, 0 );
-
- #if defined(__FreeBSD__) || defined(__NetBSD__)
-- sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0);
-+ if (sysctlbyname("kern.cp_time", cpu_stats, &cpu_size, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl kern.cp_time failed (errno %d)\n", errno);
- #else
-- sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0);
-+ if (sysctl(cpu_mib, 2, cpu_stats, &cpu_size, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl kern.cpu failed (errno %d)\n", errno);
- #endif
- cpu->user_ticks = cpu_stats[CP_USER];
- cpu->nice_ticks = cpu_stats[CP_NICE];
-@@ -206,7 +215,8 @@ int netsnmp_cpu_arch_load( netsnmp_cache
- * Interrupt/Context Switch statistics
- * XXX - Do these really belong here ?
- */
-- sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0);
-+ if (sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl vm.vm_meter failed (errno %d)\n", errno);
- cpu->nInterrupts = mem_stats.NS_VM_INTR;
- cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
- cpu->swapIn = mem_stats.NS_VM_SWAPIN;
-@@ -218,6 +228,32 @@ int netsnmp_cpu_arch_load( netsnmp_cache
+@@ -255,6 +259,32 @@ int netsnmp_cpu_arch_load( netsnmp_cache
cpu->pageOut = mem_stats.NS_VM_PAGEOUT;
#endif
@@ -117,13 +71,3 @@ $NetBSD: patch-agent_mibgroup_hardware_c
#ifdef NETSNMP_KERN_MCPU
#if defined(KERN_CPTIME2)
mcpu_size = cpu_num*sizeof(cpu_stats);
-@@ -225,7 +261,8 @@ int netsnmp_cpu_arch_load( netsnmp_cache
- #elif defined(__NetBSD__)
- mcpu_size = cpu_num*sizeof(cpu_stats);
- mcpu_stats = malloc(mcpu_size);
-- sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0);
-+ if (sysctlbyname("kern.cp_time", mcpu_stats, &mcpu_size, NULL, 0) == -1)
-+ snmp_log(LOG_ERR, "sysctl kern.mcpu failed (errno %d)\n", errno);
- #elif defined(__FreeBSD__)
- if (cp_times == -1) {
- int ret = sysctlbyname("kern.cp_times", NULL, &mcpu_size, NULL, 0);
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__kinfo.c
diff -u pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__kinfo.c:1.4 pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__kinfo.c:1.5
--- pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__kinfo.c:1.4 Sun Jun 30 21:43:25 2019
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_data__access_swrun__kinfo.c Tue Oct 18 12:01:52 2022
@@ -1,4 +1,4 @@
-$NetBSD: patch-agent_mibgroup_host_data__access_swrun__kinfo.c,v 1.4 2019/06/30 21:43:25 kamil Exp $
+$NetBSD: patch-agent_mibgroup_host_data__access_swrun__kinfo.c,v 1.5 2022/10/18 12:01:52 adam Exp $
--- agent/mibgroup/host/data_access/swrun_kinfo.c.orig 2014-12-08 20:23:22.000000000 +0000
+++ agent/mibgroup/host/data_access/swrun_kinfo.c
@@ -13,13 +13,3 @@ $NetBSD: patch-agent_mibgroup_host_data_
#include <net-snmp/net-snmp-config.h>
#include <stdio.h>
-@@ -286,7 +290,9 @@ netsnmp_arch_swrun_container_load( netsn
- case LSSUSPENDED:
- case LSSTOP: entry->hrSWRunStatus = HRSWRUNSTATUS_NOTRUNNABLE;
- break;
-+#ifdef LSDEAD
- case LSDEAD:
-+#endif
- case LSZOMB: entry->hrSWRunStatus = HRSWRUNSTATUS_INVALID;
- break;
- default:
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c
diff -u pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c:1.1 pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c:1.2
--- pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c:1.1 Thu Aug 20 13:51:03 2015
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_kernel__sunos5.c Tue Oct 18 12:01:52 2022
@@ -1,10 +1,10 @@
-$NetBSD: patch-agent_mibgroup_kernel__sunos5.c,v 1.1 2015/08/20 13:51:03 jperkin Exp $
+$NetBSD: patch-agent_mibgroup_kernel__sunos5.c,v 1.2 2022/10/18 12:01:52 adam Exp $
Support Crossbow.
---- agent/mibgroup/kernel_sunos5.c.orig 2014-12-08 20:23:22.000000000 +0000
+--- agent/mibgroup/kernel_sunos5.c.orig 2022-07-13 21:14:14.000000000 +0000
+++ agent/mibgroup/kernel_sunos5.c
-@@ -291,8 +291,8 @@ init_kernel_sunos5(void)
+@@ -285,8 +285,8 @@ init_kernel_sunos5(void)
int
@@ -15,7 +15,7 @@ Support Crossbow.
{
kstat_ctl_t *ksc;
kstat_t *ks;
-@@ -373,7 +373,7 @@ getKstatInt(const char *classname, const
+@@ -368,7 +368,7 @@ getKstatInt(const char *classname, const
}
int
@@ -24,7 +24,7 @@ Support Crossbow.
{
kstat_ctl_t *ksc;
kstat_t *ks, *kstat_data;
-@@ -537,7 +537,7 @@ getKstat(const char *statname, const cha
+@@ -534,7 +534,7 @@ getKstat(const char *statname, const cha
}
int
@@ -33,23 +33,23 @@ Support Crossbow.
char *value, size_t value_len)
{
kstat_ctl_t *ksc;
-@@ -1642,9 +1642,9 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
- ifp->ifSpeed = 0;
+@@ -1643,9 +1643,9 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
+ ifp->ifHighSpeed = 0;
/*
- * Get link speed
+ * Get link speed, try the "link" module first, then fallback to NULL (ie: unix)
*/
-- if ((getKstatInt(NULL, name, "ifspeed", &ifp->ifSpeed) == 0)) {
+- if ((getKstat(name, "ifspeed", &ifspeed) == 0)) {
+ if ((getKstatInt("link", name, "ifspeed", &ifp->ifSpeed) == 0)) {
/*
* check for SunOS patch with half implemented ifSpeed
*/
-@@ -1652,7 +1652,10 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
- ifp->ifSpeed *= 1000000;
+@@ -1653,7 +1653,10 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
+ ifspeed *= 1000000;
}
havespeed = B_TRUE;
-- } else if (getKstatInt(NULL, name, "ifSpeed", &ifp->ifSpeed) == 0) {
+- } else if (getKstat(name, "ifSpeed", &ifspeed) == 0) {
+ /* WORKAROUND: If this is a link and DLPI doesn't know, its probly a VNIC */
+ if (ifp->ifType == 1 || ifp->ifType == 0)
+ ifp->ifType = 6;
@@ -57,7 +57,7 @@ Support Crossbow.
/*
* this is good
*/
-@@ -1683,6 +1686,9 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
+@@ -1689,6 +1692,9 @@ set_if_info(mib2_ifEntry_t *ifp, unsigne
/*
* Set link Type and Speed (if it could not be determined from kstat)
@@ -67,9 +67,9 @@ Support Crossbow.
*/
if (ifp->ifType == 24) {
ifp->ifSpeed = 127000000;
-@@ -1765,15 +1771,31 @@ get_if_stats(mib2_ifEntry_t *ifp)
+@@ -1771,15 +1777,31 @@ get_if_stats(mib2_ifEntry_t *ifp)
{
- Counter l_tmp;
+ int l_tmp;
char *name = ifp->ifDescr.o_bytes;
+ char classname[32];
@@ -100,7 +100,7 @@ Support Crossbow.
if (getKstatInt(NULL, name, "ipackets", &ifp->ifInUcastPkts) != 0) {
return (-1);
}
-@@ -1781,7 +1803,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
+@@ -1787,7 +1809,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
ifp->ifInUcastPkts = (uint32_t)(ifp->ifHCInUcastPkts & 0xffffffff);
}
@@ -109,7 +109,7 @@ Support Crossbow.
if (getKstatInt(NULL, name, "rbytes", &ifp->ifInOctets) != 0) {
ifp->ifInOctets = ifp->ifInUcastPkts * 308;
}
-@@ -1789,7 +1811,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
+@@ -1795,7 +1817,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
ifp->ifInOctets = (uint32_t)(ifp->ifHCInOctets & 0xffffffff);
}
@@ -118,7 +118,7 @@ Support Crossbow.
if (getKstatInt(NULL, name, "opackets", &ifp->ifOutUcastPkts) != 0) {
return (-1);
}
-@@ -1797,7 +1819,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
+@@ -1803,7 +1825,7 @@ get_if_stats(mib2_ifEntry_t *ifp)
ifp->ifOutUcastPkts = (uint32_t)(ifp->ifHCOutUcastPkts & 0xffffffff);
}
@@ -127,7 +127,7 @@ Support Crossbow.
if (getKstatInt(NULL, name, "obytes", &ifp->ifOutOctets) != 0) {
ifp->ifOutOctets = ifp->ifOutUcastPkts * 308; /* XXX */
}
-@@ -1809,31 +1831,31 @@ get_if_stats(mib2_ifEntry_t *ifp)
+@@ -1815,31 +1837,31 @@ get_if_stats(mib2_ifEntry_t *ifp)
return (0);
/* some? VLAN interfaces don't have error counters, so ignore failure */
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c
diff -u pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c:1.2 pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c:1.3
--- pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c:1.2 Fri Jun 12 02:22:08 2020
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udpTable.c Tue Oct 18 12:01:52 2022
@@ -1,5 +1,4 @@
-$NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.2 2020/06/12 02:22:08 sevan Exp $
-
+$NetBSD: patch-agent_mibgroup_mibII_udpTable.c,v 1.3 2022/10/18 12:01:52 adam Exp $
--- agent/mibgroup/mibII/udpTable.c.orig 2020-06-12 01:53:58.092446674 +0100
+++ agent/mibgroup/mibII/udpTable.c 2020-06-12 02:01:40.556941658 +0100
Index: pkgsrc/net/net-snmp/patches/patch-configure
diff -u pkgsrc/net/net-snmp/patches/patch-configure:1.2 pkgsrc/net/net-snmp/patches/patch-configure:1.3
--- pkgsrc/net/net-snmp/patches/patch-configure:1.2 Fri Aug 5 10:55:01 2022
+++ pkgsrc/net/net-snmp/patches/patch-configure Tue Oct 18 12:01:52 2022
@@ -1,17 +1,15 @@
-$NetBSD: patch-configure,v 1.2 2022/08/05 10:55:01 adam Exp $
+$NetBSD: patch-configure,v 1.3 2022/10/18 12:01:52 adam Exp $
- Do not store configure options as these might be polluted with workdir.
- Fix configure to look for des_cbc_encrypt in -ldes
-- Fix configure on FreeBSD 10 & newer
-- Fix portability bug in test
---- configure.orig 2018-07-16 14:33:50.000000000 +0000
+--- configure.orig 2022-07-13 21:14:22.000000000 +0000
+++ configure
-@@ -3312,10 +3312,10 @@ ac_config_headers="$ac_config_headers in
+@@ -3350,10 +3350,10 @@ ac_config_headers="$ac_config_headers in
#
cat >>confdefs.h <<_ACEOF
--#define NETSNMP_CONFIGURE_OPTIONS "$ac_configure_args"
+-#define NETSNMP_CONFIGURE_OPTIONS "${NETSNMP_CONFIGURE_OPTIONS-$ac_configure_args}"
+#define NETSNMP_CONFIGURE_OPTIONS ""
_ACEOF
@@ -20,43 +18,7 @@ $NetBSD: patch-configure,v 1.2 2022/08/0
#
-@@ -13923,7 +13923,7 @@ fi
- hardcode_shlibpath_var=no
- ;;
-
-- freebsd1*)
-+ freebsd1.*)
- ld_shlibs=no
- ;;
-
-@@ -14917,7 +14917,7 @@ dgux*)
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
--freebsd1*)
-+freebsd1.*)
- dynamic_linker=no
- ;;
-
-@@ -14928,7 +14928,7 @@ freebsd* | dragonfly*)
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
-- freebsd[123]*) objformat=aout ;;
-+ freebsd[123].*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
-@@ -19637,7 +19637,7 @@ if test "x$PARTIALTARGETOS" = "xmingw32"
- fi
-
- # Linux systemd
--if test "x$with_systemd" == "xyes"; then
-+if test "x$with_systemd" = "xyes"; then
- other_src_list="$other_src_list sd-daemon.c"
- other_objs_list="$other_objs_list sd-daemon.o"
- other_lobjs_list="$other_lobjs_list sd-daemon.lo"
-@@ -22715,6 +22715,81 @@ fi
+@@ -23440,6 +23440,81 @@ fi
##
#########################################
Index: pkgsrc/net/py-netsnmp/Makefile
diff -u pkgsrc/net/py-netsnmp/Makefile:1.10 pkgsrc/net/py-netsnmp/Makefile:1.11
--- pkgsrc/net/py-netsnmp/Makefile:1.10 Tue Jan 4 20:54:30 2022
+++ pkgsrc/net/py-netsnmp/Makefile Tue Oct 18 12:01:52 2022
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.10 2022/01/04 20:54:30 wiz Exp $
+# $NetBSD: Makefile,v 1.11 2022/10/18 12:01:52 adam Exp $
-PKGREVISION= 1
.include "../../net/net-snmp/Makefile.common"
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:S/net-snmp/netsnmp/}
Added files:
Index: pkgsrc/net/net-snmp/patches/patch-agent_auto__nlist.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_auto__nlist.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_auto__nlist.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,13 @@
+$NetBSD: patch-agent_auto__nlist.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/auto_nlist.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/auto_nlist.c
+@@ -67,7 +67,7 @@ auto_nlist_value(const char *string)
+ it->nl[0].n_name = (char *) malloc(strlen(string) + 2);
+ #if defined(aix4) || defined(aix5) || defined(aix6) || defined(aix7)
+ strcpy(it->nl[0].n_name, string);
+- it->nl[0].n_name[strlen(string)+1] = '\0';
++ /* it->nl[0].n_name[strlen(string)+1] = '\0'; */
+ #elif defined(freebsd9)
+ sprintf(__DECONST(char*, it->nl[0].n_name), "_%s", string);
+ #else
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_memory_memory__freebsd.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_memory_memory__freebsd.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_hardware_memory_memory__freebsd.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,55 @@
+$NetBSD: patch-agent_mibgroup_hardware_memory_memory__freebsd.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig 2014-12-08 20:23:22.000000000 +0000
++++ agent/mibgroup/hardware/memory/memory_freebsd.c
+@@ -36,6 +36,12 @@ int netsnmp_mem_arch_load( netsnmp_cache
+ long pagesize;
+ int nswap;
+
++#ifdef dragonfly
++ struct vmstats vms;
++ size_t vms_size = sizeof(vms);
++ size_t vmem_size = sizeof(struct vmmeter);
++#endif
++
+ #if !defined(VM_TOTAL)
+ unsigned int free_mem;
+ size_t free_size = sizeof(free_mem);
+@@ -76,11 +82,17 @@ int netsnmp_mem_arch_load( netsnmp_cache
+ sysctlbyname("vm.stats.vm.v_inactive_count", &inact_count, &inact_size, NULL, 0);
+ sysctlbyname("vfs.bufspace", &bufspace, &buf_size, NULL, 0);
+ sysctlbyname("vfs.maxbufspace", &maxbufspace, &buf_size, NULL, 0);
++#ifdef dragonfly
++ pagesize = getpagesize();
++ sysctlbyname("vm.vmstats", &vms, &vms_size, NULL, 0);
++ sysctlbyname("vm.vmmeter", &vmem, &vmem_size, NULL, 0);
++#else
+ #ifndef freebsd4
+ pagesize = 1024;
+ #else
+ pagesize = getpagesize();
+ #endif
++#endif
+
+ /*
+ * ... and save this in a standard form.
+@@ -91,6 +103,11 @@ int netsnmp_mem_arch_load( netsnmp_cache
+ } else {
+ if (!mem->descr)
+ mem->descr = strdup("Physical memory");
++#ifdef dragonfly
++ mem->units = vms.v_page_size;
++ mem->size = vms.v_cache_max;
++ mem->free = vms.v_cache_max - vms.v_cache_count;
++#else
+ mem->units = pagesize;
+ mem->size = phys_mem/pagesize;
+ #if !defined(VM_TOTAL)
+@@ -98,6 +115,7 @@ int netsnmp_mem_arch_load( netsnmp_cache
+ #else
+ mem->free = total.t_free;
+ #endif
++#endif
+ }
+
+ mem = netsnmp_memory_get_byIdx( NETSNMP_MEM_TYPE_USERMEM, 1 );
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__storage.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__storage.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__storage.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,40 @@
+$NetBSD: patch-agent_mibgroup_host_hr__storage.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/host/hr_storage.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/host/hr_storage.c
+@@ -69,6 +69,13 @@
+ #endif
+ #endif /* vm/vm.h */
+ #endif /* sys/vm.h */
++#if HAVE_SYS_POOL_H
++#if defined(MBPOOL_SYMBOL) && defined(MCLPOOL_SYMBOL)
++#define __POOL_EXPOSE
++#include <sys/pool.h>
++#else
++#undef HAVE_SYS_POOL_H
++#endif
+ #if defined(HAVE_UVM_UVM_PARAM_H) && defined(HAVE_UVM_UVM_EXTERN_H)
+ #include <uvm/uvm_param.h>
+ #include <uvm/uvm_extern.h>
+@@ -76,20 +83,13 @@
+ #include <vm/vm_param.h>
+ #include <vm/vm_extern.h>
+ #endif
++#endif
+ #if HAVE_KVM_H
+ #include <kvm.h>
+ #endif
+ #if HAVE_FCNTL_H
+ #include <fcntl.h>
+ #endif
+-#if HAVE_SYS_POOL_H
+-#if defined(MBPOOL_SYMBOL) && defined(MCLPOOL_SYMBOL)
+-#define __POOL_EXPOSE
+-#include <sys/pool.h>
+-#else
+-#undef HAVE_SYS_POOL_H
+-#endif
+-#endif
+ #if HAVE_SYS_MBUF_H
+ #include <sys/mbuf.h>
+ #endif
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__swrun.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__swrun.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_host_hr__swrun.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,13 @@
+$NetBSD: patch-agent_mibgroup_host_hr__swrun.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/host/hr_swrun.c.orig 2014-12-08 20:23:22.000000000 +0000
++++ agent/mibgroup/host/hr_swrun.c
+@@ -1027,6 +1027,8 @@ var_hrswrun(struct variable * vp,
+ else
+ long_return = 4; /* application */
+ #endif
++#elif defined darwin
++ long_return = -1;
+ #else
+ long_return = 4; /* application */
+ #endif
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_if-mib_data__access_interface.h
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_if-mib_data__access_interface.h:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_if-mib_data__access_interface.h Tue Oct 18 12:01:52 2022
@@ -0,0 +1,16 @@
+$NetBSD: patch-agent_mibgroup_if-mib_data__access_interface.h,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+Improve portability to newer NetBSD versions.
+
+--- agent/mibgroup/if-mib/data_access/interface.h.orig 2022-07-13 21:14:14.000000000 +0000
++++ agent/mibgroup/if-mib/data_access/interface.h
+@@ -34,7 +34,8 @@ config_require(if-mib/data_access/interf
+ config_require(if-mib/data_access/interface_ioctl)
+ #elif defined( openbsd3 ) || \
+ defined( freebsd4 ) || defined( freebsd5 ) || defined( freebsd6 ) || \
+- defined( darwin ) || defined( dragonfly ) || defined( netbsd1 )
++ defined( darwin ) || defined( dragonfly ) || defined( netbsd1 ) || \
++ defined(netbsd) || defined(netbsdelf) || defined(netbsdelf2) || defined(netbsdelf3)
+ config_require(if-mib/data_access/interface_sysctl)
+ #elif defined(solaris2)
+ config_require(if-mib/data_access/interface_solaris2)
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_icmp.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_icmp.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_icmp.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,18 @@
+$NetBSD: patch-agent_mibgroup_mibII_icmp.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/mibII/icmp.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/mibII/icmp.c
+@@ -621,6 +621,13 @@ bail:
+ #define USES_TRADITIONAL_ICMPSTAT
+ #endif
+
++#ifdef ICMP_NSTATS
++struct icmpstat {
++ uint64_t st[ICMP_NSTATS];
++};
++#define ICMP_STAT_STRUCTURE struct icmpstat
++#endif
++
+ #if !defined(ICMP_STAT_STRUCTURE)
+ #define ICMP_STAT_STRUCTURE struct icmpstat
+ #define USES_TRADITIONAL_ICMPSTAT
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_interfaces.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_interfaces.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_interfaces.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,38 @@
+$NetBSD: patch-agent_mibgroup_mibII_interfaces.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+Some systems define ifnet.if_lastchange as struct timespec (with a
+tv_nsec field measured in nanoseconds), while other systems define it
+as struct timeval (with a tv_usec field measured in microseconds).
+Both variants have a tv_sec field for integer seconds.
+
+--- agent/mibgroup/mibII/interfaces.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/mibII/interfaces.c
+@@ -871,15 +871,25 @@ var_ifEntry(struct variable *vp,
+ * * this is fixed, thus the 199607 comparison.
+ */
+ if (ifnet.if_lastchange.tv_sec == 0 &&
+- ifnet.if_lastchange.tv_usec == 0)
++#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
++ ifnet.if_lastchange.tv_nsec == 0
++#else
++ ifnet.if_lastchange.tv_usec == 0
++#endif
++ )
+ long_return = 0;
+ else if (ifnet.if_lastchange.tv_sec < starttime.tv_sec)
+ long_return = 0;
+ else {
+ long_return = (u_long)
+ ((ifnet.if_lastchange.tv_sec - starttime.tv_sec) * 100
+- + (ifnet.if_lastchange.tv_usec -
+- starttime.tv_usec) / 10000);
++ + (
++#if HAVE_STRUCT_IFNET_IF_LASTCHANGE_TV_NSEC
++ ifnet.if_lastchange.tv_nsec / 1000
++#else
++ ifnet.if_lastchange.tv_usec
++#endif
++ - starttime.tv_usec) / 10000);
+ }
+ #else
+ #if NETSNMP_NO_DUMMY_VALUES
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_ip.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_ip.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_ip.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,23 @@
+$NetBSD: patch-agent_mibgroup_mibII_ip.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/mibII/ip.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/mibII/ip.c
+@@ -255,6 +255,18 @@ long ipTTL, oldipTTL;
+ #define USES_TRADITIONAL_IPSTAT
+ #endif
+
++#ifdef IP_NSTATS
++typedef struct ipstat {
++ uint64_t st[IP_NSTATS];
++};
++#define IP_STAT_STRUCTURE struct ipstat
++#endif
++
++#ifdef dragonfly
++#define IP_STAT_STRUCTURE struct ip_stats
++#define USES_TRADITIONAL_IPSTAT
++#endif
++
+ #if !defined(IP_STAT_STRUCTURE)
+ #define IP_STAT_STRUCTURE struct ipstat
+ #define USES_TRADITIONAL_IPSTAT
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcp.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcp.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_tcp.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,97 @@
+$NetBSD: patch-agent_mibgroup_mibII_tcp.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/mibII/tcp.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/mibII/tcp.c
+@@ -197,6 +197,16 @@ init_tcp(void)
+ #define USES_TRADITIONAL_TCPSTAT
+ #endif
+
++#ifdef TCP_NSTATS
++typedef uint32_t tcp_stats[TCP_NSTATS];
++#define TCP_STAT_STRUCTURE tcp_stats
++#endif
++
++#ifdef dragonfly
++#define TCP_STAT_STRUCTURE struct tcp_stats
++#define USES_TRADITIONAL_TCPSTAT
++#endif
++
+ #if !defined(TCP_STAT_STRUCTURE)
+ #define TCP_STAT_STRUCTURE struct tcpstat
+ #define USES_TRADITIONAL_TCPSTAT
+@@ -324,6 +334,75 @@ tcp_handler(netsnmp_mib_handler
+ #endif /* linux */
+ netsnmp_set_request_error(reqinfo, request, SNMP_NOSUCHOBJECT);
+ continue;
++#elif defined(TCP_NSTAT)
++ case TCPRTOALGORITHM: /* Assume Van Jacobsen's algorithm */
++ ret_value = 4;
++ type = ASN_INTEGER;
++ break;
++ case TCPRTOMIN:
++#ifdef TCPTV_NEEDS_HZ
++ ret_value = TCPTV_MIN;
++#else
++ ret_value = TCPTV_MIN / PR_SLOWHZ * 1000;
++#endif
++ type = ASN_INTEGER;
++ break;
++ case TCPRTOMAX:
++#ifdef TCPTV_NEEDS_HZ
++ ret_value = TCPTV_REXMTMAX;
++#else
++ ret_value = TCPTV_REXMTMAX / PR_SLOWHZ * 1000;
++#endif
++ type = ASN_INTEGER;
++ break;
++ case TCPMAXCONN:
++ ret_value = -1; /* Dynamic maximum */
++ type = ASN_INTEGER;
++ break;
++ case TCPACTIVEOPENS:
++ ret_value = tcpstat[TCP_STAT_CONNATTEMPT];
++ break;
++ case TCPPASSIVEOPENS:
++ ret_value = tcpstat[TCP_STAT_ACCEPTS];
++ break;
++ /*
++ * NB: tcps_drops is actually the sum of the two MIB
++ * counters tcpAttemptFails and tcpEstabResets.
++ */
++ case TCPATTEMPTFAILS:
++ ret_value = tcpstat[TCP_STAT_CONNDROPS];
++ break;
++ case TCPESTABRESETS:
++ ret_value = tcpstat[TCP_STAT_DROPS];
++ break;
++ case TCPCURRESTAB:
++#ifdef USING_MIBII_TCPTABLE_MODULE
++ ret_value = TCP_Count_Connections();
++#else
++ ret_value = 0;
++#endif
++ type = ASN_GAUGE;
++ break;
++ case TCPINSEGS:
++ ret_value = tcpstat[TCP_STAT_RCVTOTAL];
++ break;
++ case TCPOUTSEGS:
++ /*
++ * RFC 1213 defines this as the number of segments sent
++ * "excluding those containing only retransmitted octets"
++ */
++ ret_value = tcpstat[TCP_STAT_SNDTOTAL] - tcpstat[TCP_STAT_SNDREXMITPACK];
++ break;
++ case TCPRETRANSSEGS:
++ ret_value = tcpstat[TCP_STAT_SNDREXMITPACK];
++ break;
++ case TCPINERRS:
++ ret_value = tcpstat[TCP_STAT_RCVBADSUM] + tcpstat[TCP_STAT_RCVBADOFF]
++ + tcpstat[TCP_STAT_RCVMEMDROP] + tcpstat[TCP_STAT_RCVSHORT];
++ break;
++ case TCPOUTRSTS:
++ ret_value = tcpstat[TCP_STAT_SNDCTRL] - tcpstat[TCP_STAT_CLOSED];
++ break;
+ #elif defined(USES_TRADITIONAL_TCPSTAT) && !defined(_USE_FIRST_PROTOCOL)
+ #ifdef HAVE_SYS_TCPIPSTATS_H
+ /*
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udp.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udp.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_udp.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,17 @@
+$NetBSD: patch-agent_mibgroup_mibII_udp.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/mibII/udp.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/mibII/udp.c
+@@ -151,6 +151,12 @@ init_udp(void)
+ #define USES_TRADITIONAL_UDPSTAT
+ #endif
+
++#ifdef UDP_NSTATS
++typedef struct udpstat {
++ uint64_t st[UDP_NSTATS];
++};
++#define UDP_STAT_STRUCTURE struct udpstat
++#endif
+
+ #if !defined(UDP_STAT_STRUCTURE)
+ #define UDP_STAT_STRUCTURE struct udpstat
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_var__route.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_var__route.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_mibII_var__route.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,19 @@
+$NetBSD: patch-agent_mibgroup_mibII_var__route.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+Fix for systems with RTF_LLDATA in place of RTF_LLINFO.
+
+--- agent/mibgroup/mibII/var_route.c.orig 2016-04-29 19:35:23.000000000 +0000
++++ agent/mibgroup/mibII/var_route.c
+@@ -954,8 +954,12 @@ load_rtentries(struct radix_node *pt)
+ }
+ #if CHECK_RT_FLAGS
+ if (((rt.rt_flags & RTF_CLONING) != RTF_CLONING)
++#ifdef RTF_LLDATA
++ && ((rt.rt_flags & RTF_LLDATA) != RTF_LLDATA)) {
++#else
+ && ((rt.rt_flags & RTF_LLINFO) != RTF_LLINFO)) {
+ #endif
++#endif
+ /*
+ * check for space and malloc
+ */
Index: pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c Tue Oct 18 12:01:52 2022
@@ -0,0 +1,39 @@
+$NetBSD: patch-agent_mibgroup_ucd-snmp_memory__netbsd1.c,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- agent/mibgroup/ucd-snmp/memory_netbsd1.c.orig 2012-10-09 22:28:58.000000000 +0000
++++ agent/mibgroup/ucd-snmp/memory_netbsd1.c
+@@ -165,7 +165,7 @@ var_extensible_mem(struct variable *vp,
+ static char errmsg[1024];
+
+ static struct uvmexp uvmexp;
+- int uvmexp_size = sizeof(uvmexp);
++ size_t uvmexp_size = sizeof(uvmexp);
+ int uvmexp_mib[] = { CTL_VM, VM_UVMEXP };
+ static struct vmtotal total;
+ size_t total_size = sizeof(total);
+@@ -181,13 +181,22 @@ var_extensible_mem(struct variable *vp,
+ /*
+ * Memory info
+ */
+- sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0);
+- sysctl(total_mib, 2, &total, &total_size, NULL, 0);
++ if (sysctl(uvmexp_mib, 2, &uvmexp, &uvmexp_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl VM_UVMEXP failed (errno %d)\n", errno);
++ return NULL;
++ }
++ if (sysctl(total_mib, 2, &total, &total_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl VM_METER failed (errno %d)\n", errno);
++ return NULL;
++ }
+
+ /*
+ * Physical memory
+ */
+- sysctl(phys_mem_mib, 2, &phys_mem, &phys_mem_size, NULL, 0);
++ if (sysctl(phys_mem_mib, 2, &phys_mem, &phys_mem_size, NULL, 0) == -1) {
++ snmp_log(LOG_ERR, "sysctl HW_USERMEM failed (errno %d)\n", errno);
++ return NULL;
++ }
+
+ long_ret = 0; /* set to 0 as default */
+
Index: pkgsrc/net/net-snmp/patches/patch-ov_UCD-fields
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-ov_UCD-fields:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-ov_UCD-fields Tue Oct 18 12:01:52 2022
@@ -0,0 +1,12 @@
+$NetBSD: patch-ov_UCD-fields,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- ov/UCD-fields.orig 2012-10-09 22:28:58.000000000 +0000
++++ ov/UCD-fields
+@@ -11,6 +11,7 @@ Field "SNMPAgent" {
+ "UCD Ultrix",
+ "UCD NetBSD",
+ "UCD FreeBSD",
++ "UCD DragonFly",
+ "UCD IRIX",
+ "UCD Linux",
+ "UCD BSD/OS",
Index: pkgsrc/net/net-snmp/patches/patch-ov_oid__to__type.in
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-ov_oid__to__type.in:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-ov_oid__to__type.in Tue Oct 18 12:01:52 2022
@@ -0,0 +1,12 @@
+$NetBSD: patch-ov_oid__to__type.in,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+--- ov/oid_to_type.in.orig 2012-10-09 22:28:58.000000000 +0000
++++ ov/oid_to_type.in
+@@ -6,6 +6,7 @@ EXTENSIBLEDOTMIB.AGENTID.OSFID:DEC:UCD O
+ EXTENSIBLEDOTMIB.AGENTID.ULTRIXID:DEC:UCD Ultrix
+ EXTENSIBLEDOTMIB.AGENTID.NETBSD1ID:NetBSD:UCD NetBSD
+ EXTENSIBLEDOTMIB.AGENTID.FREEBSDID:FreeBSD:UCD FreeBSD
++EXTENSIBLEDOTMIB.AGENTID.DRAGONFLYID:FreeBSD:UCD DragonFly
+ EXTENSIBLEDOTMIB.AGENTID.IRIXID:SGI:UCD IRIX
+ EXTENSIBLEDOTMIB.AGENTID.LINUXID:Linux:UCD Linux
+ EXTENSIBLEDOTMIB.AGENTID.BSDIID:BSDI:UCD BSD/OS
Index: pkgsrc/net/net-snmp/patches/patch-perl_OID_OID.xs
diff -u /dev/null pkgsrc/net/net-snmp/patches/patch-perl_OID_OID.xs:1.1
--- /dev/null Tue Oct 18 12:01:53 2022
+++ pkgsrc/net/net-snmp/patches/patch-perl_OID_OID.xs Tue Oct 18 12:01:52 2022
@@ -0,0 +1,20 @@
+$NetBSD: patch-perl_OID_OID.xs,v 1.1 2022/10/18 12:01:52 adam Exp $
+
+Adopt FreeBSD's patch to make this build with perl 5.24, ref.
+https://svnweb.freebsd.org/ports/head/net-mgmt/net-snmp/files/patch-perl5.23?view=co
+https://rt.perl.org/Public/Bug/Display.html?id=125907#txn-1363270
+https://bugs.gentoo.org/show_bug.cgi?id=582368
+
+--- perl/OID/OID.xs.orig 2016-06-06 13:52:38.000000000 +0000
++++ perl/OID/OID.xs
+@@ -7,6 +7,10 @@
+ #include "perl.h"
+ #include "XSUB.h"
+
++#ifdef U64TYPE
++#define U64 U64pairU32
++#endif
++
+ #include <net-snmp/net-snmp-config.h>
+ #include <net-snmp/net-snmp-includes.h>
+
Home |
Main Index |
Thread Index |
Old Index