summaryrefslogtreecommitdiff
path: root/net-mgmt/net-snmp
diff options
context:
space:
mode:
Diffstat (limited to 'net-mgmt/net-snmp')
-rw-r--r--net-mgmt/net-snmp/Makefile9
-rw-r--r--net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c22
2 files changed, 27 insertions, 4 deletions
diff --git a/net-mgmt/net-snmp/Makefile b/net-mgmt/net-snmp/Makefile
index e7558608e1b8..4a15477cc3c4 100644
--- a/net-mgmt/net-snmp/Makefile
+++ b/net-mgmt/net-snmp/Makefile
@@ -1,7 +1,7 @@
PORTNAME= snmp
PORTVERSION= 5.9.4
-PORTEPOCH= 1
PORTREVISION= 6
+PORTEPOCH= 1
CATEGORIES= net-mgmt
MASTER_SITES= SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
ZI
@@ -20,7 +20,7 @@ NOT_FOR_ARCHS_REASON= SSP is currently broken on MIPS
OPTIONS_DEFINE= MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
MYSQL AX_SOCKONLY UNPRIVILEGED SMUX DOCS AX_DISABLE_TRAP \
- TLS NEWSYSLOG NOLIBPKG SCTP
+ TLS NEWSYSLOG NOLIBPKG SCTP AES
OPTIONS_DEFAULT=PERL PERL_EMBEDDED DUMMY SMUX NEWSYSLOG
OPTIONS_SUB= yes
@@ -35,6 +35,7 @@ SMUX_DESC= Build with SNMP multiplexing (SMUX) support
NEWSYSLOG_DESC= Automatically rotate snmpd.log via newsyslog
NOLIBPKG_DESC= Build without libpkg
SCTP_DESC= Build with SCTP MIB support
+AES_DESC= Build with Blumenthal AES support
USERS= snmpd
GROUPS= snmpd
@@ -95,6 +96,10 @@ CONFIGURE_ARGS+=--with-openssl="${OPENSSLBASE}"
CONFIGURE_ARGS+=--with-dummy-values
.endif
+.if ${PORT_OPTIONS:MAES}
+CONFIGURE_ARGS+=--enable-blumenthal-aes
+.endif
+
.if ! ${PORT_OPTIONS:MTKMIB}
PLIST_SUB+= WITH_TKMIB="@comment "
.else
diff --git a/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c
index af46e3d86d43..83470a30dedf 100644
--- a/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c
+++ b/net-mgmt/net-snmp/files/patch-agent_mibgroup_mibII_tcp.c
@@ -1,5 +1,5 @@
---- agent/mibgroup/mibII/tcp.c.orig 2023-08-15 20:32:01 UTC
-+++ agent/mibgroup/mibII/tcp.c
+--- agent/mibgroup/mibII/tcp.c.orig 2023-08-15 13:32:01.000000000 -0700
++++ agent/mibgroup/mibII/tcp.c 2025-07-10 17:17:00.309421000 -0700
@@ -8,6 +8,14 @@
#include <net-snmp/net-snmp-features.h>
#include "mibII_common.h"
@@ -15,3 +15,21 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+@@ -38,8 +46,17 @@
+ #include <netinet/tcpip.h>
+ #endif
+ #ifdef HAVE_NETINET_TCP_TIMER_H
++#if __FreeBSD_version >= 1500048
++#define _KERNEL
++#define max(x, y) (((x) > (y)) ? (x) : (y))
++#define MSEC_2_TICKS(m) max(1, (uint32_t)((hz == 1000) ? \
++ (m) : ((uint64_t)(m) * (uint64_t)hz)/(uint64_t)1000))
++#endif
+ #include <netinet/tcp_timer.h>
++#if __FreeBSD_version >= 1500048
++#undef _KERNEL
+ #endif
++#endif
+ #ifdef HAVE_NETINET_TCP_VAR_H
+ #ifdef openbsd7
+ #define _KERNEL /* OpenBSD 7.3 */