Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Sep 2019 15:16:23 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r513140 - in head/net-mgmt/net-snmp: . files
Message-ID:  <201909281516.x8SFGNnS063908@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Sat Sep 28 15:16:22 2019
New Revision: 513140
URL: https://svnweb.freebsd.org/changeset/ports/513140

Log:
  net-mgmt/net-snmp: update 5.7.3 -> 5.8
  
  PR:		232025
  Approved by:	zi (maintainer timeout)
  Relnotes:	https://sourceforge.net/p/net-snmp/mailman/message/36386084/

Added:
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c   (contents, props changed)
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcpTable.c   (contents, props changed)
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_udpTable.c   (contents, props changed)
  head/net-mgmt/net-snmp/files/patch-include_net-snmp_library_transform__oids.h   (contents, props changed)
  head/net-mgmt/net-snmp/files/patch-snmplib_snmpusm.c   (contents, props changed)
Deleted:
  head/net-mgmt/net-snmp/files/extra-patch-openssl11
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu_sysctl.c
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_fsys_fsys__getfsstats.c
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_ucd-snmp_diskio.c
  head/net-mgmt/net-snmp/files/patch-include__net-snmp__net-snmp-config.h.in
  head/net-mgmt/net-snmp/files/patch-kthreads
  head/net-mgmt/net-snmp/files/patch-perl5.23
  head/net-mgmt/net-snmp/files/patch-snmplib_snmp__api.c
  head/net-mgmt/net-snmp/files/patch-snmpusm.c
  head/net-mgmt/net-snmp/files/patch-tcpTable.c
  head/net-mgmt/net-snmp/files/patch-transform_oids.h
  head/net-mgmt/net-snmp/files/patch-udpTable.c
Modified:
  head/net-mgmt/net-snmp/Makefile
  head/net-mgmt/net-snmp/distinfo
  head/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in
  head/net-mgmt/net-snmp/files/patch-Makefile.in   (contents, props changed)
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_memory_memory__freebsd.c
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_icmp.h
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_tcp-mib_data__access_tcpConn__freebsd4.c
  head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c
  head/net-mgmt/net-snmp/files/patch-include_net-snmp_system_freebsd13.h
  head/net-mgmt/net-snmp/pkg-plist

Modified: head/net-mgmt/net-snmp/Makefile
==============================================================================
--- head/net-mgmt/net-snmp/Makefile	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/Makefile	Sat Sep 28 15:16:22 2019	(r513140)
@@ -2,8 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	snmp
-PORTVERSION=	5.7.3
-PORTREVISION=	20
+PORTVERSION=	5.8
 CATEGORIES=	net-mgmt ipv6
 MASTER_SITES=	SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
 		ZI
@@ -21,7 +20,19 @@ LIB_DEPENDS=	libpkg.so:ports-mgmt/pkg
 NOT_FOR_ARCHS=		mips mips64
 NOT_FOR_ARCHS_REASON=	SSP is currently broken on MIPS
 
-OPTIONS_DEFINE=	IPV6 MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
+LIB_DEPENDS=	libpkg.so:ports-mgmt/pkg \
+		libpcre.so:devel/pcre
+
+USES=		cpe libtool perl5 ssl
+USE_RC_SUBR=	snmpd snmptrapd
+USE_LDCONFIG=	yes
+USE_PERL5=	build run
+USE_CSTD=	c99
+
+CPE_VENDOR=	net-snmp
+GNU_CONFIGURE=	yes
+
+OPTIONS_DEFINE=	MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
 		MYSQL AX_SOCKONLY UNPRIVILEGED SMUX DOCS JAIL AX_DISABLE_TRAP \
 		TLS NEWSYSLOG
 OPTIONS_DEFAULT=PERL PERL_EMBEDDED DUMMY SMUX NEWSYSLOG
@@ -42,14 +53,6 @@ MAKE_JOBS_UNSAFE=	yes
 
 PORTSCOUT=	skipv:5.7.2.1
 
-GNU_CONFIGURE=	yes
-USE_RC_SUBR=	snmpd snmptrapd
-USE_LDCONFIG=	yes
-USES=		cpe libtool perl5 ssl
-CPE_VENDOR=	net-snmp
-USE_PERL5=	build run
-USE_CSTD=	c99
-
 CFLAGS+=	-I${LOCALBASE}/include -I${PKG_PREFIX}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
 CONFIGURE_ENV+=	PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
@@ -75,10 +78,6 @@ TLS_CONFIGURE_ON=	--with-security-modules=tsm --with-t
 
 .include <bsd.port.options.mk>
 
-.if (${OSVERSION} >= 1200085 || ${SSL_DEFAULT:Mopenssl111*})
-EXTRA_PATCHES=	${PATCHDIR}/extra-patch-openssl11
-.endif
-
 .if ${PORT_OPTIONS:MPYTHON}
 PYDISTUTILS_PKGNAME?=		netsnmp-python
 PYDISTUTILS_PKGVERSION?=	1.0a1
@@ -139,20 +138,12 @@ CONFIGURE_ARGS+=--disable-snmptrapd-subagent
 CONFIGURE_ARGS+=--enable-agentx-dom-sock-only
 .endif
 
-.if ${PORT_OPTIONS:MIPV6}
-CONFIGURE_ARGS+=--enable-ipv6
-# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
-PLIST_SUB+=	WITH_IPV6=""
-.else
-PLIST_SUB+=	WITH_IPV6="@comment "
-.endif
-
 .if ${PORT_OPTIONS:MUNPRIVILEGED}
 CONFIGURE_ARGS+=--without-root-access
 .endif
 
-SHLIB_VERSION=	30
-SHLIB_VERSION2=	.0.3
+SHLIB_VERSION=	35
+SHLIB_VERSION2=	.0.0
 PLIST_SUB+=	SHLIB_VERSION=${SHLIB_VERSION} SHLIB_VERSION2=${SHLIB_VERSION2}
 SCRIPTS_SUB=	PREFIX=${PREFIX} PERL=${PERL}
 
@@ -197,7 +188,12 @@ CONFIGURE_ARGS+=--with-out-mib-modules="${NET_SNMP_WIT
 BIN_FILES=	snmpbulkwalk snmpget snmpgetnext snmpset \
 		snmpstatus snmptest snmptranslate snmptrap snmpwalk \
 		snmptable snmpbulkget snmpdelta snmpdf agentxtrap \
-		snmpvacm snmpusm encode_keychange snmpnetstat
+		snmpvacm snmpusm encode_keychange snmpnetstat \
+		snmppcap snmpping snmpps
+.if ${PORT_OPTIONS:MTLS}
+BIN_FILES+=	snmptls
+.endif
+
 LIB_FILES=	libnetsnmp.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
 		libnetsnmpagent.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
 		libnetsnmpmibs.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
@@ -244,17 +240,13 @@ pre-everything::
 
 post-patch:
 .for filename in ${SCRIPT_FILES}
-	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/local/${filename}
+	${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/local/${filename}
 .endfor
-	@${REINPLACE_CMD} -e 's!utmp_p->ut_name!utmp_p->ut_user!' \
+	${REINPLACE_CMD} -e 's!utmp_p->ut_name!utmp_p->ut_user!' \
 	    ${WRKSRC}/agent/mibgroup/host/hr_system.c
-	@${REINPLACE_CMD} -E -e 's|return pci_lookup_name|disabled broken|g' \
+	${REINPLACE_CMD} -E -e 's|return pci_lookup_name|disabled broken|g' \
 		${WRKSRC}/configure
-.if (${OSVERSION} >= 1200085 || ${SSL_DEFAULT:Mopenssl111*})
-	@${REINPLACE_CMD} -E -e 's|SSL_library_init|OPENSSL_init_ssl|g' \
-		${WRKSRC}/configure
-.endif
-	@${CP} ${WRKSRC}/include/net-snmp/system/freebsd12.h \
+	${CP} ${WRKSRC}/include/net-snmp/system/freebsd12.h \
 		${WRKSRC}/include/net-snmp/system/freebsd13.h
 
 post-configure:
@@ -308,7 +300,7 @@ install-config-files:
 
 install-doc-files:
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
 . for filename in ${DOC_FILES}
 	${INSTALL_DATA} ${WRKSRC}/${filename} ${STAGEDIR}${DOCSDIR}
 . endfor

Modified: head/net-mgmt/net-snmp/distinfo
==============================================================================
--- head/net-mgmt/net-snmp/distinfo	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/distinfo	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,2 +1,3 @@
-SHA256 (net-snmp-5.7.3.tar.gz) = 12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0
-SIZE (net-snmp-5.7.3.tar.gz) = 6382428
+TIMESTAMP = 1538855962
+SHA256 (net-snmp-5.8.tar.gz) = b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf
+SIZE (net-snmp-5.8.tar.gz) = 6591680

Modified: head/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in
==============================================================================
--- head/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/extra-patch-local_Makefile.in	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,11 +1,11 @@
---- local/Makefile.in.orig	2015-01-19 14:37:56 UTC
+--- local/Makefile.in.orig	2018-07-16 14:33:40 UTC
 +++ local/Makefile.in
-@@ -16,7 +16,7 @@ OTHERUNINSTALL=localuninstall
+@@ -14,7 +14,7 @@ OTHERUNINSTALL=localuninstall
  #
  SNMPCONFPATH=@SNMPCONFPATH@
  PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@
--PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert
-+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert
+-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert checkbandwidth
++PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert checkbandwidth
  SHELLSCRIPTS=mib2c-update
  SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
  	ipf-mod.pl.made snmpconf.made traptoemail.made snmp-bridge-mib.made \

Modified: head/net-mgmt/net-snmp/files/patch-Makefile.in
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-Makefile.in	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/patch-Makefile.in	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,19 +1,19 @@
---- Makefile.in.orig	2014-12-08 20:23:22 UTC
+--- Makefile.in.orig	2018-07-16 14:33:40 UTC
 +++ Makefile.in
-@@ -21,7 +21,7 @@ INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi
- 	darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \
+@@ -22,7 +22,7 @@ INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi
+ 	dragonfly.h dynix.h \
  	freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \
  	freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \
--	freebsd12.h freebsd.h \
-+	freebsd12.h freebsd13.h freebsd.h \
-         generic.h \
- 	hpux.h irix.h linux.h mingw32.h mips.h netbsd.h osf5.h \
- 	openbsd.h openbsd5.h openbsd4.h \
-@@ -230,7 +230,7 @@ pythonmodules: subdirs
+-	freebsd12.h freebsd.h kfreebsd.h \
++	freebsd12.h freebsd13.h freebsd.h kfreebsd.h \
+ 	generic.h \
+ 	hpux.h irix.h linux.h mingw32.h mingw32msvc.h mips.h \
+ 	netbsd.h nto-qnx6.h osf5.h \
+@@ -234,7 +234,7 @@ pythonmodules: subdirs
          fi
  
  pythoninstall:
--	@(dir=`pwd`; cd python; $(PYMAKE) install --basedir=$$dir) ; \
+-	@(dir=`pwd`; cd python; $(PYMAKE) install --basedir=$$dir --root=$(DESTDIR) --prefix=$(prefix)) ; \
 +	@(dir=`pwd`; cd python; $(PYMAKE) install --root=${STAGEDIR} --basedir=$$dir ${PYDISTUTILS_INSTALLARGS}) ; \
          if test $$? != 0 ; then \
             exit 1 ; \

Added: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -0,0 +1,49 @@
+--- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig	2018-07-16 14:33:40 UTC
++++ agent/mibgroup/hardware/cpu/cpu_sysctl.c
+@@ -133,8 +133,21 @@ void init_cpu_sysctl( void ) {
+ #endif  /* VM_UVMEXP2 || VM_UVMEXP */
+ 
+ #elif defined(__FreeBSD__)                /* FreeBSD */
++#if __FreeBSD_version >= 1200028
++#define	VMMETER_TYPE	uint64_t
++#else
++#define	VMMETER_TYPE	u_int
++#endif
++struct __vmmeter {
++	VMMETER_TYPE	v_intr;
++	VMMETER_TYPE	v_swtch;
++	VMMETER_TYPE	v_swappgsin;
++	VMMETER_TYPE	v_swappgsout;
++	VMMETER_TYPE	v_swapin;
++	VMMETER_TYPE	v_swapout;
++};
+ #define NETSNMP_VM_STATS       VM_METER
+-#define NETSNMP_VM_STATS_TYPE  struct vmmeter
++#define NETSNMP_VM_STATS_TYPE  struct __vmmeter
+     #define NS_VM_INTR		v_intr
+     #define NS_VM_SWTCH		v_swtch
+     #define NS_VM_PAGEIN	v_swappgsin
+@@ -209,7 +222,23 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void 
+          * Interrupt/Context Switch statistics
+          *   XXX - Do these really belong here ?
+          */
++#ifdef __FreeBSD__
++#define	GET_VM_STATS(space, name) sysctlbyname("vm.stats." #space "." #name, &mem_stats.name, &len, NULL, 0)
++    {
++	size_t len;
++
++	len = sizeof(VMMETER_TYPE);
++	GET_VM_STATS(sys, v_intr);
++	GET_VM_STATS(sys, v_swtch);
++	GET_VM_STATS(vm, v_swappgsin);
++	GET_VM_STATS(vm, v_swappgsout);
++	GET_VM_STATS(vm, v_swapin);
++	GET_VM_STATS(vm, v_swapout);
++    }
++#undef GET_VM_STATS
++#else
+     sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0);
++#endif
+     cpu->nInterrupts  = mem_stats.NS_VM_INTR;
+     cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
+     cpu->swapIn       = mem_stats.NS_VM_SWAPIN;

Modified: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_memory_memory__freebsd.c
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_memory_memory__freebsd.c	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_hardware_memory_memory__freebsd.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,6 +1,6 @@
---- agent/mibgroup/hardware/memory/memory_freebsd.c.orig	2015-02-20 14:44:47 UTC
+--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig	2018-07-16 14:33:40 UTC
 +++ agent/mibgroup/hardware/memory/memory_freebsd.c
-@@ -163,7 +163,7 @@ int netsnmp_mem_arch_load( netsnmp_cache
+@@ -163,7 +163,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void 
          if (!mem->descr)
               mem->descr = strdup("Cached memory");
          mem->units = pagesize;

Modified: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_icmp.h
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_icmp.h	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_icmp.h	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,11 +1,9 @@
---- agent/mibgroup/mibII/icmp.h.orig	2014-12-08 20:23:22 UTC
-+++ agent/mibgroup/mibII/icmp.h
-@@ -14,6 +14,9 @@ config_arch_require(freebsd7,  mibII/ker
- config_arch_require(freebsd8,  mibII/kernel_sysctl)
- config_arch_require(freebsd9,  mibII/kernel_sysctl)
+--- agent/mibgroup/mibII/icmp.h.orig	2018-07-16 16:33:40.000000000 +0200
++++ agent/mibgroup/mibII/icmp.h	2019-06-15 17:15:20.270320000 +0200
+@@ -16,6 +16,7 @@
  config_arch_require(freebsd10, mibII/kernel_sysctl)
-+config_arch_require(freebsd11, mibII/kernel_sysctl)
-+config_arch_require(freebsd12, mibII/kernel_sysctl)
+ config_arch_require(freebsd11, mibII/kernel_sysctl)
+ config_arch_require(freebsd12, mibII/kernel_sysctl)
 +config_arch_require(freebsd13, mibII/kernel_sysctl)
  config_arch_require(netbsd,    mibII/kernel_netbsd)
  config_arch_require(netbsdelf, mibII/kernel_netbsd)

Added: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcpTable.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcpTable.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -0,0 +1,46 @@
+--- agent/mibgroup/mibII/tcpTable.c.orig	2018-07-16 14:33:40 UTC
++++ agent/mibgroup/mibII/tcpTable.c
+@@ -120,7 +120,11 @@ struct netsnmp_tcpConnEntry_s {
+ 
+ typedef struct netsnmp_inpcb_s netsnmp_inpcb;
+ struct netsnmp_inpcb_s {
++#if __FreeBSD_version >= 1200026
++    struct xinpcb   pcb;
++#else
+     struct inpcb    pcb;
++#endif
+     int             state;
+     netsnmp_inpcb  *inp_next;
+ };
+@@ -330,8 +334,10 @@ tcpTable_handler(netsnmp_mib_handler          *handler
+ #ifndef NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS
+ int
+ TCP_Count_Connections( void ) {
++#if (defined(CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST))
+     tcpTable_load(NULL, NULL);
+     return tcp_estab;
++#endif
+ }
+ #endif /* NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS */
+ 
+@@ -988,12 +994,20 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic)
+         nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
+         if (!nnew)
+             break;
++#if __FreeBSD_version >= 1200026
++        nnew->state = StateMap[((NS_ELEM *) xig)->t_state];
++#else
+         nnew->state = StateMap[((NS_ELEM *) xig)->xt_tp.t_state];
++#endif
+         if (nnew->state == 5 /* established */ ||
+             nnew->state == 8 /*  closeWait  */ )
+             tcp_estab++;
+         memcpy(&(nnew->pcb), &(((NS_ELEM *) xig)->xt_inp),
++#if __FreeBSD_version >= 1200026
++                           sizeof(struct xinpcb));
++#else
+                            sizeof(struct inpcb));
++#endif
+ 
+ #ifdef INP_ISIPV6
+ 	if (INP_ISIPV6(&nnew->pcb))

Added: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_udpTable.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_udpTable.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -0,0 +1,26 @@
+--- agent/mibgroup/mibII/udpTable.c.orig	2018-07-16 14:33:40 UTC
++++ agent/mibgroup/mibII/udpTable.c
+@@ -97,7 +97,11 @@ struct netsnmp_udpEntry_s {
+ #if defined(freebsd4) || defined(darwin) || defined(osf5)
+ typedef struct netsnmp_inpcb_s netsnmp_inpcb;
+ struct netsnmp_inpcb_s {
++#if __FreeBSD_version >= 1200026
++    struct xinpcb   pcb;
++#else
+     struct inpcb    pcb;
++#endif
+     int             state;
+     netsnmp_inpcb  *inp_next;
+ };
+@@ -708,7 +712,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic)
+         nnew = SNMP_MALLOC_TYPEDEF(UDPTABLE_ENTRY_TYPE);
+         if (!nnew)
+             break;
++#if __FreeBSD_version >= 1200026
++        memcpy(&nnew->pcb, xig, sizeof(struct xinpcb));
++#else
+         memcpy(&nnew->pcb, &((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
++#endif
+ 	nnew->inp_next = udp_head;
+ 	udp_head   = nnew;
+ #if defined(dragonfly)

Modified: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_tcp-mib_data__access_tcpConn__freebsd4.c
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-agent_mibgroup_tcp-mib_data__access_tcpConn__freebsd4.c	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_tcp-mib_data__access_tcpConn__freebsd4.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,6 +1,6 @@
---- agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c.orig	2017-03-15 18:15:07.000000000 +0000
-+++ agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c	2017-03-15 18:15:07.000000000 +0000
-@@ -163,7 +163,11 @@
+--- agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c.orig	2018-07-16 14:33:40 UTC
++++ agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c
+@@ -163,7 +163,11 @@ _load(netsnmp_container *container, u_int load_flags)
  #else
  	xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
  #endif
@@ -12,12 +12,12 @@
  
  	if (load_flags) {
  	    if (state == TCPCONNECTIONSTATE_LISTEN) {
-@@ -215,6 +219,8 @@
+@@ -223,6 +227,8 @@ _load(netsnmp_container *container, u_int load_flags)
          entry->arbitrary_index = CONTAINER_SIZE(container) + 1;
          CONTAINER_INSERT(container, entry);
      }
 +
 +    free(tcpcb_buf);
  
-     if(rc<0)
-         return rc;
+     free(tcpcb_buf);
+ 

Modified: head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,18 +1,6 @@
---- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig	2014-12-08 12:23:22.000000000 -0800
-+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c	2017-04-07 16:05:05.752849000 -0700
-@@ -153,7 +153,11 @@
- #endif
- 
- #if !defined(NETSNMP_ENABLE_IPV6)
-+#if __FreeBSD_version >= 1200026
-+	if (pcb.inp_vflag & INP_IPV6)
-+#else
-         if (pcb.xi_inp.inp_vflag & INP_IPV6)
-+#endif
- 	    continue;
- #endif
- 
-@@ -164,9 +168,24 @@
+--- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig	2018-07-16 14:33:40 UTC
++++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c
+@@ -168,9 +168,24 @@ _load(netsnmp_container *container, u_int load_flags)
          }
  
          /** oddly enough, these appear to already be in network order */
@@ -37,8 +25,8 @@
 -        entry->pid = 0;
          
          /** the addr string may need work */
- 	if (pcb.xi_inp.inp_vflag & INP_IPV6) {
-@@ -179,6 +198,8 @@
+ #ifdef INP_ISIPV6
+@@ -187,6 +202,8 @@ _load(netsnmp_container *container, u_int load_flags)
  	    memcpy(entry->loc_addr, &pcb.xi_inp.inp_laddr, 4);
  	    memcpy(entry->rmt_addr, &pcb.xi_inp.inp_faddr, 4);
  	}
@@ -47,12 +35,12 @@
  
          /*
           * add entry to container
-@@ -187,6 +208,8 @@
+@@ -194,6 +211,8 @@ _load(netsnmp_container *container, u_int load_flags)
+ 	entry->index = CONTAINER_SIZE(container) + 1;
          CONTAINER_INSERT(container, entry);
      }
- 
-+    free(udpcb_buf);
 +
-     if(rc<0)
-         return rc;
++    free(udpcb_buf);
+ 
+     free(udpcb_buf);
  

Added: head/net-mgmt/net-snmp/files/patch-include_net-snmp_library_transform__oids.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/net-snmp/files/patch-include_net-snmp_library_transform__oids.h	Sat Sep 28 15:16:22 2019	(r513140)
@@ -0,0 +1,11 @@
+--- include/net-snmp/library/transform_oids.h.orig	2018-07-16 14:33:40 UTC
++++ include/net-snmp/library/transform_oids.h
+@@ -48,6 +48,8 @@ NETSNMP_IMPORT oid      usmDESPrivProtocol[10];
+ 
+ NETSNMP_IMPORT oid      usmAESPrivProtocol[10];
+ NETSNMP_IMPORT oid      *usmAES128PrivProtocol; /* backwards compat */
++NETSNMP_IMPORT oid      *usmAES192PrivProtocol; /* backwards compat */
++NETSNMP_IMPORT oid      *usmAES256PrivProtocol; /* backwards compat */
+ 
+ /*
+  * backwards compatibility. should not be used in internal code.

Modified: head/net-mgmt/net-snmp/files/patch-include_net-snmp_system_freebsd13.h
==============================================================================
--- head/net-mgmt/net-snmp/files/patch-include_net-snmp_system_freebsd13.h	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/files/patch-include_net-snmp_system_freebsd13.h	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,6 +1,6 @@
---- include/net-snmp/system/freebsd13.h.orig	2018-12-25 15:35:28 UTC
+--- include/net-snmp/system/freebsd13.h.orig	2019-03-07 15:59:25 UTC
 +++ include/net-snmp/system/freebsd13.h
 @@ -0,0 +1,3 @@
-+/* freebsd13 is a superset of freebsd12 */
-+#include "freebsd12.h"
-+#define freebsd13 freebsd13
++/* freebsd12 is a superset of freebsd11 */
++#include "freebsd11.h"
++#define freebsd11 freebsd11

Added: head/net-mgmt/net-snmp/files/patch-snmplib_snmpusm.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-mgmt/net-snmp/files/patch-snmplib_snmpusm.c	Sat Sep 28 15:16:22 2019	(r513140)
@@ -0,0 +1,11 @@
+--- snmplib/snmpusm.c.orig	2018-07-16 14:33:40 UTC
++++ snmplib/snmpusm.c
+@@ -117,6 +117,8 @@ oid             usmDESPrivProtocol[10] = { 1, 3, 6, 1,
+ oid    usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 };
+ /* backwards compat */
+ oid    *usmAES128PrivProtocol = usmAESPrivProtocol;
++oid    *usmAES192PrivProtocol = usmAESPrivProtocol;
++oid    *usmAES256PrivProtocol = usmAESPrivProtocol;
+ 
+ #ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04
+     /* OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt */

Modified: head/net-mgmt/net-snmp/pkg-plist
==============================================================================
--- head/net-mgmt/net-snmp/pkg-plist	Sat Sep 28 15:09:57 2019	(r513139)
+++ head/net-mgmt/net-snmp/pkg-plist	Sat Sep 28 15:16:22 2019	(r513140)
@@ -1,4 +1,5 @@
 bin/agentxtrap
+bin/checkbandwidth
 bin/encode_keychange
 bin/fixproc
 bin/ipf-mod.pl
@@ -18,11 +19,15 @@ bin/snmpget
 bin/snmpgetnext
 bin/snmpinform
 bin/snmpnetstat
+bin/snmppcap
+bin/snmpping
+bin/snmpps
 bin/snmpset
 bin/snmpstatus
 bin/snmptable
 bin/snmptest
 %%TLS%%bin/snmptls
+bin/snmptop
 bin/snmptranslate
 bin/snmptrap
 bin/snmpusm
@@ -54,6 +59,7 @@ include/net-snmp/agent/mib_modules.h
 include/net-snmp/agent/mode_end_call.h
 include/net-snmp/agent/multiplexer.h
 include/net-snmp/agent/net-snmp-agent-includes.h
+include/net-snmp/agent/netsnmp_close_fds.h
 include/net-snmp/agent/null.h
 include/net-snmp/agent/old_api.h
 include/net-snmp/agent/read_only.h
@@ -110,6 +116,7 @@ include/net-snmp/library/lcd_time.h
 include/net-snmp/library/md5.h
 include/net-snmp/library/mib.h
 include/net-snmp/library/mt_support.h
+include/net-snmp/library/netsnmp-attribute-format.h
 include/net-snmp/library/oid_stash.h
 include/net-snmp/library/parse.h
 include/net-snmp/library/read_config.h
@@ -120,11 +127,11 @@ include/net-snmp/library/snmpAliasDomain.h
 include/net-snmp/library/snmpCallbackDomain.h
 %%TLS%%include/net-snmp/library/snmpDTLSUDPDomain.h
 include/net-snmp/library/snmpTCPDomain.h
-%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h
+include/net-snmp/library/snmpTCPIPv6Domain.h
 %%TLS%%include/net-snmp/library/snmpTLSBaseDomain.h
 %%TLS%%include/net-snmp/library/snmpTLSTCPDomain.h
 include/net-snmp/library/snmpUDPDomain.h
-%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h
+include/net-snmp/library/snmpUDPIPv6Domain.h
 include/net-snmp/library/snmpUnixDomain.h
 include/net-snmp/library/snmp_alarm.h
 include/net-snmp/library/snmp_api.h
@@ -142,7 +149,7 @@ include/net-snmp/library/snmp_transport.h
 include/net-snmp/library/snmpusm.h
 include/net-snmp/library/snmpv3-security-includes.h
 include/net-snmp/library/snmpv3.h
-%%WITH_IPV6%%include/net-snmp/library/snmpIPv6BaseDomain.h
+include/net-snmp/library/snmpIPv6BaseDomain.h
 include/net-snmp/library/snmpUDPBaseDomain.h
 include/net-snmp/library/snmpUDPIPv4BaseDomain.h
 include/net-snmp/library/snmpTCPBaseDomain.h
@@ -177,6 +184,13 @@ include/net-snmp/system/darwin7.h
 include/net-snmp/system/darwin8.h
 include/net-snmp/system/darwin9.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/dragonfly.h
 include/net-snmp/system/dynix.h
 include/net-snmp/system/freebsd.h
@@ -195,13 +209,17 @@ include/net-snmp/system/freebsd13.h
 include/net-snmp/system/generic.h
 include/net-snmp/system/hpux.h
 include/net-snmp/system/irix.h
+include/net-snmp/system/kfreebsd.h
 include/net-snmp/system/linux.h
 include/net-snmp/system/mingw32.h
+include/net-snmp/system/mingw32msvc.h
 include/net-snmp/system/mips.h
 include/net-snmp/system/netbsd.h
+include/net-snmp/system/nto-qnx6.h
 include/net-snmp/system/openbsd.h
 include/net-snmp/system/openbsd4.h
 include/net-snmp/system/openbsd5.h
+include/net-snmp/system/openbsd6.h
 include/net-snmp/system/osf5.h
 include/net-snmp/system/solaris.h
 include/net-snmp/system/solaris2.3.h
@@ -254,6 +272,8 @@ man/man1/snmpget.1.gz
 man/man1/snmpgetnext.1.gz
 man/man1/snmpinform.1.gz
 man/man1/snmpnetstat.1.gz
+man/man1/snmpps.1.gz
+man/man1/snmptop.1.gz
 man/man1/snmpset.1.gz
 man/man1/snmpstatus.1.gz
 man/man1/snmptable.1.gz
@@ -376,7 +396,7 @@ man/man8/snmptrapd.8.gz
 %%WITH_PERL%%man/man3/NetSNMP::default_store.3.gz
 %%WITH_PERL%%man/man3/NetSNMP::netsnmp_request_infoPtr.3.gz
 %%WITH_PERL%%man/man3/SNMP.3.gz
-%%WITH_PERL%%%%SITE_ARCH%%/Bundle/Makefile.subs.pl
+%%WITH_PERL%%%%SITE_ARCH%%/Bundle/MakefileSubs.pm
 %%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/ASN.pm
 %%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/OID.pm
 %%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/TrapReceiver.pm
@@ -431,6 +451,7 @@ sbin/snmptrapd
 %%DATADIR%%/mib2c.mfd.conf
 %%DATADIR%%/mib2c.notify.conf
 %%DATADIR%%/mib2c.old-api.conf
+%%DATADIR%%/mib2c.org-mode.conf
 %%DATADIR%%/mib2c.perl.conf
 %%DATADIR%%/mib2c.raw-table.conf
 %%DATADIR%%/mib2c.scalar.conf
@@ -553,6 +574,7 @@ sbin/snmptrapd
 %%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
 %%DATADIR%%/mibs/SNMP-USM-AES-MIB.txt
 %%DATADIR%%/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
+%%DATADIR%%/mibs/SNMP-USM-HMAC-SHA2-MIB.txt
 %%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
 %%DATADIR%%/mibs/SNMPv2-CONF.txt
 %%DATADIR%%/mibs/SNMPv2-MIB.txt
@@ -568,7 +590,7 @@ sbin/snmptrapd
 %%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
 %%DATADIR%%/mibs/UCD-SNMP-MIB.txt
 %%DATADIR%%/mibs/UDP-MIB.txt
-@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
+@preunexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
 %%WITH_PERL_EMBEDDED%%%%DATADIR%%/snmp_perl.pl
 %%DATADIR%%/snmpconf-data/snmp-data/authopts
 %%DATADIR%%/snmpconf-data/snmp-data/debugging



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909281516.x8SFGNnS063908>