View | Details | Raw Unified | Return to bug 232025 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-27 / +36 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	snmp
4
PORTNAME=	snmp
5
PORTVERSION=	5.8
5
PORTVERSION=	5.7.3
6
PORTREVISION=	20
7
PORTEPOCH=	1
6
CATEGORIES=	net-mgmt ipv6
8
CATEGORIES=	net-mgmt ipv6
7
MASTER_SITES=	SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
9
MASTER_SITES=	SF/net-${PORTNAME}/net-${PORTNAME}/${PORTVERSION} \
8
		ZI
10
		ZI
Lines 18-36 Link Here
18
NOT_FOR_ARCHS=		mips mips64
20
NOT_FOR_ARCHS=		mips mips64
19
NOT_FOR_ARCHS_REASON=	SSP is currently broken on MIPS
21
NOT_FOR_ARCHS_REASON=	SSP is currently broken on MIPS
20
22
21
LIB_DEPENDS=	libpkg.so:ports-mgmt/pkg \
23
OPTIONS_DEFINE=	IPV6 MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
22
		libpcre.so:devel/pcre
23
24
USES=		cpe libtool perl5 ssl
25
USE_RC_SUBR=	snmpd snmptrapd
26
USE_LDCONFIG=	yes
27
USE_PERL5=	build run
28
USE_CSTD=	c99
29
30
CPE_VENDOR=	net-snmp
31
GNU_CONFIGURE=	yes
32
33
OPTIONS_DEFINE=	MFD_REWRITES PERL PERL_EMBEDDED PYTHON DUMMY TKMIB \
34
		MYSQL AX_SOCKONLY UNPRIVILEGED SMUX DOCS JAIL AX_DISABLE_TRAP \
24
		MYSQL AX_SOCKONLY UNPRIVILEGED SMUX DOCS JAIL AX_DISABLE_TRAP \
35
		TLS NEWSYSLOG
25
		TLS NEWSYSLOG
36
OPTIONS_DEFAULT=PERL PERL_EMBEDDED DUMMY SMUX NEWSYSLOG
26
OPTIONS_DEFAULT=PERL PERL_EMBEDDED DUMMY SMUX NEWSYSLOG
Lines 51-56 Link Here
51
41
52
PORTSCOUT=	skipv:5.7.2.1
42
PORTSCOUT=	skipv:5.7.2.1
53
43
44
GNU_CONFIGURE=	yes
45
USE_RC_SUBR=	snmpd snmptrapd
46
USE_LDCONFIG=	yes
47
USES=		cpe libtool perl5 ssl
48
CPE_VENDOR=	net-snmp
49
USE_PERL5=	build run
50
USE_CSTD=	c99
51
54
CFLAGS+=	-I${LOCALBASE}/include -I${PKG_PREFIX}/include
52
CFLAGS+=	-I${LOCALBASE}/include -I${PKG_PREFIX}/include
55
LDFLAGS+=	-L${LOCALBASE}/lib
53
LDFLAGS+=	-L${LOCALBASE}/lib
56
CONFIGURE_ENV+=	PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
54
CONFIGURE_ENV+=	PERLPROG="${PERL}" PSPROG="${PS_CMD}" SED="${SED}"
Lines 76-81 Link Here
76
74
77
.include <bsd.port.options.mk>
75
.include <bsd.port.options.mk>
78
76
77
.if (${OSVERSION} >= 1200085 || ${SSL_DEFAULT:Mopenssl111*})
78
EXTRA_PATCHES=	${PATCHDIR}/extra-patch-openssl11
79
.endif
80
79
.if ${PORT_OPTIONS:MPYTHON}
81
.if ${PORT_OPTIONS:MPYTHON}
80
PYDISTUTILS_PKGNAME?=		netsnmp-python
82
PYDISTUTILS_PKGNAME?=		netsnmp-python
81
PYDISTUTILS_PKGVERSION?=	1.0a1
83
PYDISTUTILS_PKGVERSION?=	1.0a1
Lines 136-147 Link Here
136
CONFIGURE_ARGS+=--enable-agentx-dom-sock-only
138
CONFIGURE_ARGS+=--enable-agentx-dom-sock-only
137
.endif
139
.endif
138
140
141
.if ${PORT_OPTIONS:MIPV6}
142
CONFIGURE_ARGS+=--enable-ipv6
143
# --with-transport="UDPIPv6 TCPIPv6" --with-modules=mibII/ipv6"
144
PLIST_SUB+=	WITH_IPV6=""
145
.else
146
PLIST_SUB+=	WITH_IPV6="@comment "
147
.endif
148
139
.if ${PORT_OPTIONS:MUNPRIVILEGED}
149
.if ${PORT_OPTIONS:MUNPRIVILEGED}
140
CONFIGURE_ARGS+=--without-root-access
150
CONFIGURE_ARGS+=--without-root-access
141
.endif
151
.endif
142
152
143
SHLIB_VERSION=	35
153
SHLIB_VERSION=	30
144
SHLIB_VERSION2=	.0.0
154
SHLIB_VERSION2=	.0.3
145
PLIST_SUB+=	SHLIB_VERSION=${SHLIB_VERSION} SHLIB_VERSION2=${SHLIB_VERSION2}
155
PLIST_SUB+=	SHLIB_VERSION=${SHLIB_VERSION} SHLIB_VERSION2=${SHLIB_VERSION2}
146
SCRIPTS_SUB=	PREFIX=${PREFIX} PERL=${PERL}
156
SCRIPTS_SUB=	PREFIX=${PREFIX} PERL=${PERL}
147
157
Lines 186-197 Link Here
186
BIN_FILES=	snmpbulkwalk snmpget snmpgetnext snmpset \
196
BIN_FILES=	snmpbulkwalk snmpget snmpgetnext snmpset \
187
		snmpstatus snmptest snmptranslate snmptrap snmpwalk \
197
		snmpstatus snmptest snmptranslate snmptrap snmpwalk \
188
		snmptable snmpbulkget snmpdelta snmpdf agentxtrap \
198
		snmptable snmpbulkget snmpdelta snmpdf agentxtrap \
189
		snmpvacm snmpusm encode_keychange snmpnetstat \
199
		snmpvacm snmpusm encode_keychange snmpnetstat
190
		snmppcap snmpping snmpps
191
.if ${PORT_OPTIONS:MTLS}
192
BIN_FILES+=	snmptls
193
.endif
194
195
LIB_FILES=	libnetsnmp.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
200
LIB_FILES=	libnetsnmp.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
196
		libnetsnmpagent.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
201
		libnetsnmpagent.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
197
		libnetsnmpmibs.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
202
		libnetsnmpmibs.so.${SHLIB_VERSION}${SHLIB_VERSION2} \
Lines 238-250 Link Here
238
243
239
post-patch:
244
post-patch:
240
.for filename in ${SCRIPT_FILES}
245
.for filename in ${SCRIPT_FILES}
241
	${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/local/${filename}
246
	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' ${WRKSRC}/local/${filename}
242
.endfor
247
.endfor
243
	${REINPLACE_CMD} -e 's!utmp_p->ut_name!utmp_p->ut_user!' \
248
	@${REINPLACE_CMD} -e 's!utmp_p->ut_name!utmp_p->ut_user!' \
244
	    ${WRKSRC}/agent/mibgroup/host/hr_system.c
249
	    ${WRKSRC}/agent/mibgroup/host/hr_system.c
245
	${REINPLACE_CMD} -E -e 's|return pci_lookup_name|disabled broken|g' \
250
	@${REINPLACE_CMD} -E -e 's|return pci_lookup_name|disabled broken|g' \
246
		${WRKSRC}/configure
251
		${WRKSRC}/configure
247
	${CP} ${WRKSRC}/include/net-snmp/system/freebsd12.h \
252
.if (${OSVERSION} >= 1200085 || ${SSL_DEFAULT:Mopenssl111*})
253
	@${REINPLACE_CMD} -E -e 's|SSL_library_init|OPENSSL_init_ssl|g' \
254
		${WRKSRC}/configure
255
.endif
256
	@${CP} ${WRKSRC}/include/net-snmp/system/freebsd12.h \
248
		${WRKSRC}/include/net-snmp/system/freebsd13.h
257
		${WRKSRC}/include/net-snmp/system/freebsd13.h
249
258
250
post-configure:
259
post-configure:
Lines 298-304 Link Here
298
307
299
install-doc-files:
308
install-doc-files:
300
.if ${PORT_OPTIONS:MDOCS}
309
.if ${PORT_OPTIONS:MDOCS}
301
	${MKDIR} ${STAGEDIR}${DOCSDIR}
310
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
302
. for filename in ${DOC_FILES}
311
. for filename in ${DOC_FILES}
303
	${INSTALL_DATA} ${WRKSRC}/${filename} ${STAGEDIR}${DOCSDIR}
312
	${INSTALL_DATA} ${WRKSRC}/${filename} ${STAGEDIR}${DOCSDIR}
304
. endfor
313
. endfor
(-)distinfo (-3 / +2 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1538855962
1
SHA256 (net-snmp-5.7.3.tar.gz) = 12ef89613c7707dc96d13335f153c1921efc9d61d3708ef09f3fc4a7014fb4f0
2
SHA256 (net-snmp-5.8.tar.gz) = b2fc3500840ebe532734c4786b0da4ef0a5f67e51ef4c86b3345d697e4976adf
2
SIZE (net-snmp-5.7.3.tar.gz) = 6382428
3
SIZE (net-snmp-5.8.tar.gz) = 6591680
(-)files/extra-patch-local_Makefile.in (-4 / +4 lines)
Lines 1-11 Link Here
1
--- local/Makefile.in.orig	2018-07-16 14:33:40 UTC
1
--- local/Makefile.in.orig	2015-01-19 14:37:56 UTC
2
+++ local/Makefile.in
2
+++ local/Makefile.in
3
@@ -14,7 +14,7 @@ OTHERUNINSTALL=localuninstall
3
@@ -16,7 +16,7 @@ OTHERUNINSTALL=localuninstall
4
 #
4
 #
5
 SNMPCONFPATH=@SNMPCONFPATH@
5
 SNMPCONFPATH=@SNMPCONFPATH@
6
 PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@
6
 PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@
7
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert checkbandwidth
7
-PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert
8
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert checkbandwidth
8
+PERLSCRIPTS=snmpcheck mib2c fixproc ipf-mod.pl snmpconf traptoemail snmp-bridge-mib net-snmp-cert
9
 SHELLSCRIPTS=mib2c-update
9
 SHELLSCRIPTS=mib2c-update
10
 SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
10
 SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
11
 	ipf-mod.pl.made snmpconf.made traptoemail.made snmp-bridge-mib.made \
11
 	ipf-mod.pl.made snmpconf.made traptoemail.made snmp-bridge-mib.made \
(-)files/patch-Makefile.in (-10 / +10 lines)
Lines 1-19 Link Here
1
--- Makefile.in.orig	2018-07-16 14:33:40 UTC
1
--- Makefile.in.orig	2014-12-08 20:23:22 UTC
2
+++ Makefile.in
2
+++ Makefile.in
3
@@ -22,7 +22,7 @@ INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi
3
@@ -21,7 +21,7 @@ INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi
4
 	dragonfly.h dynix.h \
4
 	darwin.h darwin7.h darwin8.h darwin9.h darwin10.h dragonfly.h dynix.h \
5
 	freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \
5
 	freebsd2.h freebsd3.h freebsd4.h freebsd5.h freebsd6.h \
6
 	freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \
6
 	freebsd7.h freebsd8.h freebsd9.h freebsd10.h freebsd11.h \
7
-	freebsd12.h freebsd.h kfreebsd.h \
7
-	freebsd12.h freebsd.h \
8
+	freebsd12.h freebsd13.h freebsd.h kfreebsd.h \
8
+	freebsd12.h freebsd13.h freebsd.h \
9
 	generic.h \
9
         generic.h \
10
 	hpux.h irix.h linux.h mingw32.h mingw32msvc.h mips.h \
10
 	hpux.h irix.h linux.h mingw32.h mips.h netbsd.h osf5.h \
11
 	netbsd.h nto-qnx6.h osf5.h \
11
 	openbsd.h openbsd5.h openbsd4.h \
12
@@ -234,7 +234,7 @@ pythonmodules: subdirs
12
@@ -230,7 +230,7 @@ pythonmodules: subdirs
13
         fi
13
         fi
14
 
14
 
15
 pythoninstall:
15
 pythoninstall:
16
-	@(dir=`pwd`; cd python; $(PYMAKE) install --basedir=$$dir --root=$(DESTDIR) --prefix=$(prefix)) ; \
16
-	@(dir=`pwd`; cd python; $(PYMAKE) install --basedir=$$dir) ; \
17
+	@(dir=`pwd`; cd python; $(PYMAKE) install --root=${STAGEDIR} --basedir=$$dir ${PYDISTUTILS_INSTALLARGS}) ; \
17
+	@(dir=`pwd`; cd python; $(PYMAKE) install --root=${STAGEDIR} --basedir=$$dir ${PYDISTUTILS_INSTALLARGS}) ; \
18
         if test $$? != 0 ; then \
18
         if test $$? != 0 ; then \
19
            exit 1 ; \
19
            exit 1 ; \
(-)files/patch-agent_mibgroup_hardware_cpu_cpu__sysctl.c (-49 lines)
Lines 1-49 Link Here
1
--- agent/mibgroup/hardware/cpu/cpu_sysctl.c.orig	2018-07-16 14:33:40 UTC
2
+++ agent/mibgroup/hardware/cpu/cpu_sysctl.c
3
@@ -133,8 +133,21 @@ void init_cpu_sysctl( void ) {
4
 #endif  /* VM_UVMEXP2 || VM_UVMEXP */
5
 
6
 #elif defined(__FreeBSD__)                /* FreeBSD */
7
+#if __FreeBSD_version >= 1200028
8
+#define	VMMETER_TYPE	uint64_t
9
+#else
10
+#define	VMMETER_TYPE	u_int
11
+#endif
12
+struct __vmmeter {
13
+	VMMETER_TYPE	v_intr;
14
+	VMMETER_TYPE	v_swtch;
15
+	VMMETER_TYPE	v_swappgsin;
16
+	VMMETER_TYPE	v_swappgsout;
17
+	VMMETER_TYPE	v_swapin;
18
+	VMMETER_TYPE	v_swapout;
19
+};
20
 #define NETSNMP_VM_STATS       VM_METER
21
-#define NETSNMP_VM_STATS_TYPE  struct vmmeter
22
+#define NETSNMP_VM_STATS_TYPE  struct __vmmeter
23
     #define NS_VM_INTR		v_intr
24
     #define NS_VM_SWTCH		v_swtch
25
     #define NS_VM_PAGEIN	v_swappgsin
26
@@ -209,7 +222,23 @@ int netsnmp_cpu_arch_load( netsnmp_cache *cache, void 
27
          * Interrupt/Context Switch statistics
28
          *   XXX - Do these really belong here ?
29
          */
30
+#ifdef __FreeBSD__
31
+#define	GET_VM_STATS(space, name) sysctlbyname("vm.stats." #space "." #name, &mem_stats.name, &len, NULL, 0)
32
+    {
33
+	size_t len;
34
+
35
+	len = sizeof(VMMETER_TYPE);
36
+	GET_VM_STATS(sys, v_intr);
37
+	GET_VM_STATS(sys, v_swtch);
38
+	GET_VM_STATS(vm, v_swappgsin);
39
+	GET_VM_STATS(vm, v_swappgsout);
40
+	GET_VM_STATS(vm, v_swapin);
41
+	GET_VM_STATS(vm, v_swapout);
42
+    }
43
+#undef GET_VM_STATS
44
+#else
45
     sysctl(mem_mib, 2, &mem_stats, &mem_size, NULL, 0);
46
+#endif
47
     cpu->nInterrupts  = mem_stats.NS_VM_INTR;
48
     cpu->nCtxSwitches = mem_stats.NS_VM_SWTCH;
49
     cpu->swapIn       = mem_stats.NS_VM_SWAPIN;
(-)files/patch-agent_mibgroup_hardware_memory_memory__freebsd.c (-2 / +2 lines)
Lines 1-6 Link Here
1
--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig	2018-07-16 14:33:40 UTC
1
--- agent/mibgroup/hardware/memory/memory_freebsd.c.orig	2015-02-20 14:44:47 UTC
2
+++ agent/mibgroup/hardware/memory/memory_freebsd.c
2
+++ agent/mibgroup/hardware/memory/memory_freebsd.c
3
@@ -163,7 +163,7 @@ int netsnmp_mem_arch_load( netsnmp_cache *cache, void 
3
@@ -163,7 +163,7 @@ int netsnmp_mem_arch_load( netsnmp_cache
4
         if (!mem->descr)
4
         if (!mem->descr)
5
              mem->descr = strdup("Cached memory");
5
              mem->descr = strdup("Cached memory");
6
         mem->units = pagesize;
6
         mem->units = pagesize;
(-)files/patch-agent_mibgroup_mibII_icmp.h (-5 / +7 lines)
Lines 1-9 Link Here
1
--- agent/mibgroup/mibII/icmp.h.orig	2018-07-16 16:33:40.000000000 +0200
1
--- agent/mibgroup/mibII/icmp.h.orig	2014-12-08 20:23:22 UTC
2
+++ agent/mibgroup/mibII/icmp.h	2019-06-15 17:15:20.270320000 +0200
2
+++ agent/mibgroup/mibII/icmp.h
3
@@ -16,6 +16,7 @@
3
@@ -14,6 +14,9 @@ config_arch_require(freebsd7,  mibII/ker
4
 config_arch_require(freebsd8,  mibII/kernel_sysctl)
5
 config_arch_require(freebsd9,  mibII/kernel_sysctl)
4
 config_arch_require(freebsd10, mibII/kernel_sysctl)
6
 config_arch_require(freebsd10, mibII/kernel_sysctl)
5
 config_arch_require(freebsd11, mibII/kernel_sysctl)
7
+config_arch_require(freebsd11, mibII/kernel_sysctl)
6
 config_arch_require(freebsd12, mibII/kernel_sysctl)
8
+config_arch_require(freebsd12, mibII/kernel_sysctl)
7
+config_arch_require(freebsd13, mibII/kernel_sysctl)
9
+config_arch_require(freebsd13, mibII/kernel_sysctl)
8
 config_arch_require(netbsd,    mibII/kernel_netbsd)
10
 config_arch_require(netbsd,    mibII/kernel_netbsd)
9
 config_arch_require(netbsdelf, mibII/kernel_netbsd)
11
 config_arch_require(netbsdelf, mibII/kernel_netbsd)
(-)files/patch-agent_mibgroup_mibII_tcpTable.c (-46 lines)
Lines 1-46 Link Here
1
--- agent/mibgroup/mibII/tcpTable.c.orig	2018-07-16 14:33:40 UTC
2
+++ agent/mibgroup/mibII/tcpTable.c
3
@@ -120,7 +120,11 @@ struct netsnmp_tcpConnEntry_s {
4
 
5
 typedef struct netsnmp_inpcb_s netsnmp_inpcb;
6
 struct netsnmp_inpcb_s {
7
+#if __FreeBSD_version >= 1200026
8
+    struct xinpcb   pcb;
9
+#else
10
     struct inpcb    pcb;
11
+#endif
12
     int             state;
13
     netsnmp_inpcb  *inp_next;
14
 };
15
@@ -330,8 +334,10 @@ tcpTable_handler(netsnmp_mib_handler          *handler
16
 #ifndef NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS
17
 int
18
 TCP_Count_Connections( void ) {
19
+#if (defined(CAN_USE_SYSCTL) && defined(TCPCTL_PCBLIST))
20
     tcpTable_load(NULL, NULL);
21
     return tcp_estab;
22
+#endif
23
 }
24
 #endif /* NETSNMP_FEATURE_REMOVE_TCP_COUNT_CONNECTIONS */
25
 
26
@@ -988,12 +994,20 @@ tcpTable_load(netsnmp_cache *cache, void *vmagic)
27
         nnew = SNMP_MALLOC_TYPEDEF(netsnmp_inpcb);
28
         if (!nnew)
29
             break;
30
+#if __FreeBSD_version >= 1200026
31
+        nnew->state = StateMap[((NS_ELEM *) xig)->t_state];
32
+#else
33
         nnew->state = StateMap[((NS_ELEM *) xig)->xt_tp.t_state];
34
+#endif
35
         if (nnew->state == 5 /* established */ ||
36
             nnew->state == 8 /*  closeWait  */ )
37
             tcp_estab++;
38
         memcpy(&(nnew->pcb), &(((NS_ELEM *) xig)->xt_inp),
39
+#if __FreeBSD_version >= 1200026
40
+                           sizeof(struct xinpcb));
41
+#else
42
                            sizeof(struct inpcb));
43
+#endif
44
 
45
 #ifdef INP_ISIPV6
46
 	if (INP_ISIPV6(&nnew->pcb))
(-)files/patch-agent_mibgroup_mibII_udpTable.c (-26 lines)
Lines 1-26 Link Here
1
--- agent/mibgroup/mibII/udpTable.c.orig	2018-07-16 14:33:40 UTC
2
+++ agent/mibgroup/mibII/udpTable.c
3
@@ -97,7 +97,11 @@ struct netsnmp_udpEntry_s {
4
 #if defined(freebsd4) || defined(darwin) || defined(osf5)
5
 typedef struct netsnmp_inpcb_s netsnmp_inpcb;
6
 struct netsnmp_inpcb_s {
7
+#if __FreeBSD_version >= 1200026
8
+    struct xinpcb   pcb;
9
+#else
10
     struct inpcb    pcb;
11
+#endif
12
     int             state;
13
     netsnmp_inpcb  *inp_next;
14
 };
15
@@ -708,7 +712,11 @@ udpTable_load(netsnmp_cache *cache, void *vmagic)
16
         nnew = SNMP_MALLOC_TYPEDEF(UDPTABLE_ENTRY_TYPE);
17
         if (!nnew)
18
             break;
19
+#if __FreeBSD_version >= 1200026
20
+        memcpy(&nnew->pcb, xig, sizeof(struct xinpcb));
21
+#else
22
         memcpy(&nnew->pcb, &((struct xinpcb *) xig)->xi_inp, sizeof(struct inpcb));
23
+#endif
24
 	nnew->inp_next = udp_head;
25
 	udp_head   = nnew;
26
 #if defined(dragonfly)
(-)files/patch-agent_mibgroup_tcp-mib_data__access_tcpConn__freebsd4.c (-6 / +6 lines)
Lines 1-6 Link Here
1
--- agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c.orig	2018-07-16 14:33:40 UTC
1
--- agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c.orig	2017-03-15 18:15:07.000000000 +0000
2
+++ agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c
2
+++ agent/mibgroup/tcp-mib/data_access/tcpConn_freebsd4.c	2017-03-15 18:15:07.000000000 +0000
3
@@ -163,7 +163,11 @@ _load(netsnmp_container *container, u_int load_flags)
3
@@ -163,7 +163,11 @@
4
 #else
4
 #else
5
 	xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
5
 	xig = (struct xinpgen *) ((char *) xig + xig->xig_len);
6
 #endif
6
 #endif
Lines 12-18 Link Here
12
 
12
 
13
 	if (load_flags) {
13
 	if (load_flags) {
14
 	    if (state == TCPCONNECTIONSTATE_LISTEN) {
14
 	    if (state == TCPCONNECTIONSTATE_LISTEN) {
15
@@ -223,6 +227,8 @@ _load(netsnmp_container *container, u_int load_flags)
15
@@ -215,6 +219,8 @@
16
         entry->arbitrary_index = CONTAINER_SIZE(container) + 1;
16
         entry->arbitrary_index = CONTAINER_SIZE(container) + 1;
17
         CONTAINER_INSERT(container, entry);
17
         CONTAINER_INSERT(container, entry);
18
     }
18
     }
Lines 19-23 Link Here
19
+
19
+
20
+    free(tcpcb_buf);
20
+    free(tcpcb_buf);
21
 
21
 
22
     free(tcpcb_buf);
22
     if(rc<0)
23
 
23
         return rc;
(-)files/patch-agent_mibgroup_udp-mib_data__access_udp__endpoint__freebsd4.c (-10 / +22 lines)
Lines 1-6 Link Here
1
--- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig	2018-07-16 14:33:40 UTC
1
--- agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c.orig	2014-12-08 12:23:22.000000000 -0800
2
+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c
2
+++ agent/mibgroup/udp-mib/data_access/udp_endpoint_freebsd4.c	2017-04-07 16:05:05.752849000 -0700
3
@@ -168,9 +168,24 @@ _load(netsnmp_container *container, u_int load_flags)
3
@@ -153,7 +153,11 @@
4
 #endif
5
 
6
 #if !defined(NETSNMP_ENABLE_IPV6)
7
+#if __FreeBSD_version >= 1200026
8
+	if (pcb.inp_vflag & INP_IPV6)
9
+#else
10
         if (pcb.xi_inp.inp_vflag & INP_IPV6)
11
+#endif
12
 	    continue;
13
 #endif
14
 
15
@@ -164,9 +168,24 @@
4
         }
16
         }
5
 
17
 
6
         /** oddly enough, these appear to already be in network order */
18
         /** oddly enough, these appear to already be in network order */
Lines 25-32 Link Here
25
-        entry->pid = 0;
37
-        entry->pid = 0;
26
         
38
         
27
         /** the addr string may need work */
39
         /** the addr string may need work */
28
 #ifdef INP_ISIPV6
40
 	if (pcb.xi_inp.inp_vflag & INP_IPV6) {
29
@@ -187,6 +202,8 @@ _load(netsnmp_container *container, u_int load_flags)
41
@@ -179,6 +198,8 @@
30
 	    memcpy(entry->loc_addr, &pcb.xi_inp.inp_laddr, 4);
42
 	    memcpy(entry->loc_addr, &pcb.xi_inp.inp_laddr, 4);
31
 	    memcpy(entry->rmt_addr, &pcb.xi_inp.inp_faddr, 4);
43
 	    memcpy(entry->rmt_addr, &pcb.xi_inp.inp_faddr, 4);
32
 	}
44
 	}
Lines 35-46 Link Here
35
 
47
 
36
         /*
48
         /*
37
          * add entry to container
49
          * add entry to container
38
@@ -194,6 +211,8 @@ _load(netsnmp_container *container, u_int load_flags)
50
@@ -187,6 +208,8 @@
39
 	entry->index = CONTAINER_SIZE(container) + 1;
40
         CONTAINER_INSERT(container, entry);
51
         CONTAINER_INSERT(container, entry);
41
     }
52
     }
53
 
54
+    free(udpcb_buf);
42
+
55
+
43
+    free(udpcb_buf);
56
     if(rc<0)
57
         return rc;
44
 
58
 
45
     free(udpcb_buf);
46
 
(-)files/patch-include_net-snmp_library_transform__oids.h (-11 lines)
Lines 1-11 Link Here
1
--- include/net-snmp/library/transform_oids.h.orig	2018-07-16 14:33:40 UTC
2
+++ include/net-snmp/library/transform_oids.h
3
@@ -48,6 +48,8 @@ NETSNMP_IMPORT oid      usmDESPrivProtocol[10];
4
 
5
 NETSNMP_IMPORT oid      usmAESPrivProtocol[10];
6
 NETSNMP_IMPORT oid      *usmAES128PrivProtocol; /* backwards compat */
7
+NETSNMP_IMPORT oid      *usmAES192PrivProtocol; /* backwards compat */
8
+NETSNMP_IMPORT oid      *usmAES256PrivProtocol; /* backwards compat */
9
 
10
 /*
11
  * backwards compatibility. should not be used in internal code.
(-)files/patch-include_net-snmp_system_freebsd13.h (-4 / +4 lines)
Lines 1-6 Link Here
1
--- include/net-snmp/system/freebsd13.h.orig	2019-03-07 15:59:25 UTC
1
--- include/net-snmp/system/freebsd13.h.orig	2018-12-25 15:35:28 UTC
2
+++ include/net-snmp/system/freebsd13.h
2
+++ include/net-snmp/system/freebsd13.h
3
@@ -0,0 +1,3 @@
3
@@ -0,0 +1,3 @@
4
+/* freebsd12 is a superset of freebsd11 */
4
+/* freebsd13 is a superset of freebsd12 */
5
+#include "freebsd11.h"
5
+#include "freebsd12.h"
6
+#define freebsd11 freebsd11
6
+#define freebsd13 freebsd13
(-)files/patch-snmplib_snmpusm.c (-11 lines)
Lines 1-11 Link Here
1
--- snmplib/snmpusm.c.orig	2018-07-16 14:33:40 UTC
2
+++ snmplib/snmpusm.c
3
@@ -117,6 +117,8 @@ oid             usmDESPrivProtocol[10] = { 1, 3, 6, 1,
4
 oid    usmAESPrivProtocol[10] = { 1, 3, 6, 1, 6, 3, 10, 1, 2, 4 };
5
 /* backwards compat */
6
 oid    *usmAES128PrivProtocol = usmAESPrivProtocol;
7
+oid    *usmAES192PrivProtocol = usmAESPrivProtocol;
8
+oid    *usmAES256PrivProtocol = usmAESPrivProtocol;
9
 
10
 #ifdef NETSNMP_DRAFT_BLUMENTHAL_AES_04
11
     /* OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt */
(-)pkg-plist (-27 / +5 lines)
Lines 1-5 Link Here
1
bin/agentxtrap
1
bin/agentxtrap
2
bin/checkbandwidth
3
bin/encode_keychange
2
bin/encode_keychange
4
bin/fixproc
3
bin/fixproc
5
bin/ipf-mod.pl
4
bin/ipf-mod.pl
Lines 19-33 Link Here
19
bin/snmpgetnext
18
bin/snmpgetnext
20
bin/snmpinform
19
bin/snmpinform
21
bin/snmpnetstat
20
bin/snmpnetstat
22
bin/snmppcap
23
bin/snmpping
24
bin/snmpps
25
bin/snmpset
21
bin/snmpset
26
bin/snmpstatus
22
bin/snmpstatus
27
bin/snmptable
23
bin/snmptable
28
bin/snmptest
24
bin/snmptest
29
%%TLS%%bin/snmptls
25
%%TLS%%bin/snmptls
30
bin/snmptop
31
bin/snmptranslate
26
bin/snmptranslate
32
bin/snmptrap
27
bin/snmptrap
33
bin/snmpusm
28
bin/snmpusm
Lines 59-65 Link Here
59
include/net-snmp/agent/mode_end_call.h
54
include/net-snmp/agent/mode_end_call.h
60
include/net-snmp/agent/multiplexer.h
55
include/net-snmp/agent/multiplexer.h
61
include/net-snmp/agent/net-snmp-agent-includes.h
56
include/net-snmp/agent/net-snmp-agent-includes.h
62
include/net-snmp/agent/netsnmp_close_fds.h
63
include/net-snmp/agent/null.h
57
include/net-snmp/agent/null.h
64
include/net-snmp/agent/old_api.h
58
include/net-snmp/agent/old_api.h
65
include/net-snmp/agent/read_only.h
59
include/net-snmp/agent/read_only.h
Lines 116-122 Link Here
116
include/net-snmp/library/md5.h
110
include/net-snmp/library/md5.h
117
include/net-snmp/library/mib.h
111
include/net-snmp/library/mib.h
118
include/net-snmp/library/mt_support.h
112
include/net-snmp/library/mt_support.h
119
include/net-snmp/library/netsnmp-attribute-format.h
120
include/net-snmp/library/oid_stash.h
113
include/net-snmp/library/oid_stash.h
121
include/net-snmp/library/parse.h
114
include/net-snmp/library/parse.h
122
include/net-snmp/library/read_config.h
115
include/net-snmp/library/read_config.h
Lines 127-137 Link Here
127
include/net-snmp/library/snmpCallbackDomain.h
120
include/net-snmp/library/snmpCallbackDomain.h
128
%%TLS%%include/net-snmp/library/snmpDTLSUDPDomain.h
121
%%TLS%%include/net-snmp/library/snmpDTLSUDPDomain.h
129
include/net-snmp/library/snmpTCPDomain.h
122
include/net-snmp/library/snmpTCPDomain.h
130
include/net-snmp/library/snmpTCPIPv6Domain.h
123
%%WITH_IPV6%%include/net-snmp/library/snmpTCPIPv6Domain.h
131
%%TLS%%include/net-snmp/library/snmpTLSBaseDomain.h
124
%%TLS%%include/net-snmp/library/snmpTLSBaseDomain.h
132
%%TLS%%include/net-snmp/library/snmpTLSTCPDomain.h
125
%%TLS%%include/net-snmp/library/snmpTLSTCPDomain.h
133
include/net-snmp/library/snmpUDPDomain.h
126
include/net-snmp/library/snmpUDPDomain.h
134
include/net-snmp/library/snmpUDPIPv6Domain.h
127
%%WITH_IPV6%%include/net-snmp/library/snmpUDPIPv6Domain.h
135
include/net-snmp/library/snmpUnixDomain.h
128
include/net-snmp/library/snmpUnixDomain.h
136
include/net-snmp/library/snmp_alarm.h
129
include/net-snmp/library/snmp_alarm.h
137
include/net-snmp/library/snmp_api.h
130
include/net-snmp/library/snmp_api.h
Lines 149-155 Link Here
149
include/net-snmp/library/snmpusm.h
142
include/net-snmp/library/snmpusm.h
150
include/net-snmp/library/snmpv3-security-includes.h
143
include/net-snmp/library/snmpv3-security-includes.h
151
include/net-snmp/library/snmpv3.h
144
include/net-snmp/library/snmpv3.h
152
include/net-snmp/library/snmpIPv6BaseDomain.h
145
%%WITH_IPV6%%include/net-snmp/library/snmpIPv6BaseDomain.h
153
include/net-snmp/library/snmpUDPBaseDomain.h
146
include/net-snmp/library/snmpUDPBaseDomain.h
154
include/net-snmp/library/snmpUDPIPv4BaseDomain.h
147
include/net-snmp/library/snmpUDPIPv4BaseDomain.h
155
include/net-snmp/library/snmpTCPBaseDomain.h
148
include/net-snmp/library/snmpTCPBaseDomain.h
Lines 184-196 Link Here
184
include/net-snmp/system/darwin8.h
177
include/net-snmp/system/darwin8.h
185
include/net-snmp/system/darwin9.h
178
include/net-snmp/system/darwin9.h
186
include/net-snmp/system/darwin10.h
179
include/net-snmp/system/darwin10.h
187
include/net-snmp/system/darwin11.h
188
include/net-snmp/system/darwin12.h
189
include/net-snmp/system/darwin13.h
190
include/net-snmp/system/darwin14.h
191
include/net-snmp/system/darwin15.h
192
include/net-snmp/system/darwin16.h
193
include/net-snmp/system/darwin17.h
194
include/net-snmp/system/dragonfly.h
180
include/net-snmp/system/dragonfly.h
195
include/net-snmp/system/dynix.h
181
include/net-snmp/system/dynix.h
196
include/net-snmp/system/freebsd.h
182
include/net-snmp/system/freebsd.h
Lines 209-225 Link Here
209
include/net-snmp/system/generic.h
195
include/net-snmp/system/generic.h
210
include/net-snmp/system/hpux.h
196
include/net-snmp/system/hpux.h
211
include/net-snmp/system/irix.h
197
include/net-snmp/system/irix.h
212
include/net-snmp/system/kfreebsd.h
213
include/net-snmp/system/linux.h
198
include/net-snmp/system/linux.h
214
include/net-snmp/system/mingw32.h
199
include/net-snmp/system/mingw32.h
215
include/net-snmp/system/mingw32msvc.h
216
include/net-snmp/system/mips.h
200
include/net-snmp/system/mips.h
217
include/net-snmp/system/netbsd.h
201
include/net-snmp/system/netbsd.h
218
include/net-snmp/system/nto-qnx6.h
219
include/net-snmp/system/openbsd.h
202
include/net-snmp/system/openbsd.h
220
include/net-snmp/system/openbsd4.h
203
include/net-snmp/system/openbsd4.h
221
include/net-snmp/system/openbsd5.h
204
include/net-snmp/system/openbsd5.h
222
include/net-snmp/system/openbsd6.h
223
include/net-snmp/system/osf5.h
205
include/net-snmp/system/osf5.h
224
include/net-snmp/system/solaris.h
206
include/net-snmp/system/solaris.h
225
include/net-snmp/system/solaris2.3.h
207
include/net-snmp/system/solaris2.3.h
Lines 272-279 Link Here
272
man/man1/snmpgetnext.1.gz
254
man/man1/snmpgetnext.1.gz
273
man/man1/snmpinform.1.gz
255
man/man1/snmpinform.1.gz
274
man/man1/snmpnetstat.1.gz
256
man/man1/snmpnetstat.1.gz
275
man/man1/snmpps.1.gz
276
man/man1/snmptop.1.gz
277
man/man1/snmpset.1.gz
257
man/man1/snmpset.1.gz
278
man/man1/snmpstatus.1.gz
258
man/man1/snmpstatus.1.gz
279
man/man1/snmptable.1.gz
259
man/man1/snmptable.1.gz
Lines 396-402 Link Here
396
%%WITH_PERL%%man/man3/NetSNMP::default_store.3.gz
376
%%WITH_PERL%%man/man3/NetSNMP::default_store.3.gz
397
%%WITH_PERL%%man/man3/NetSNMP::netsnmp_request_infoPtr.3.gz
377
%%WITH_PERL%%man/man3/NetSNMP::netsnmp_request_infoPtr.3.gz
398
%%WITH_PERL%%man/man3/SNMP.3.gz
378
%%WITH_PERL%%man/man3/SNMP.3.gz
399
%%WITH_PERL%%%%SITE_ARCH%%/Bundle/MakefileSubs.pm
379
%%WITH_PERL%%%%SITE_ARCH%%/Bundle/Makefile.subs.pl
400
%%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/ASN.pm
380
%%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/ASN.pm
401
%%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/OID.pm
381
%%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/OID.pm
402
%%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/TrapReceiver.pm
382
%%WITH_PERL%%%%SITE_ARCH%%/NetSNMP/TrapReceiver.pm
Lines 451-457 Link Here
451
%%DATADIR%%/mib2c.mfd.conf
431
%%DATADIR%%/mib2c.mfd.conf
452
%%DATADIR%%/mib2c.notify.conf
432
%%DATADIR%%/mib2c.notify.conf
453
%%DATADIR%%/mib2c.old-api.conf
433
%%DATADIR%%/mib2c.old-api.conf
454
%%DATADIR%%/mib2c.org-mode.conf
455
%%DATADIR%%/mib2c.perl.conf
434
%%DATADIR%%/mib2c.perl.conf
456
%%DATADIR%%/mib2c.raw-table.conf
435
%%DATADIR%%/mib2c.raw-table.conf
457
%%DATADIR%%/mib2c.scalar.conf
436
%%DATADIR%%/mib2c.scalar.conf
Lines 574-580 Link Here
574
%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
553
%%DATADIR%%/mibs/SNMP-USER-BASED-SM-MIB.txt
575
%%DATADIR%%/mibs/SNMP-USM-AES-MIB.txt
554
%%DATADIR%%/mibs/SNMP-USM-AES-MIB.txt
576
%%DATADIR%%/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
555
%%DATADIR%%/mibs/SNMP-USM-DH-OBJECTS-MIB.txt
577
%%DATADIR%%/mibs/SNMP-USM-HMAC-SHA2-MIB.txt
578
%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
556
%%DATADIR%%/mibs/SNMP-VIEW-BASED-ACM-MIB.txt
579
%%DATADIR%%/mibs/SNMPv2-CONF.txt
557
%%DATADIR%%/mibs/SNMPv2-CONF.txt
580
%%DATADIR%%/mibs/SNMPv2-MIB.txt
558
%%DATADIR%%/mibs/SNMPv2-MIB.txt
Lines 590-596 Link Here
590
%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
568
%%DATADIR%%/mibs/UCD-IPFWACC-MIB.txt
591
%%DATADIR%%/mibs/UCD-SNMP-MIB.txt
569
%%DATADIR%%/mibs/UCD-SNMP-MIB.txt
592
%%DATADIR%%/mibs/UDP-MIB.txt
570
%%DATADIR%%/mibs/UDP-MIB.txt
593
@preunexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
571
@unexec rm -f %D/%%DATADIR%%/mibs/.index 2>/dev/null || true
594
%%WITH_PERL_EMBEDDED%%%%DATADIR%%/snmp_perl.pl
572
%%WITH_PERL_EMBEDDED%%%%DATADIR%%/snmp_perl.pl
595
%%DATADIR%%/snmpconf-data/snmp-data/authopts
573
%%DATADIR%%/snmpconf-data/snmp-data/authopts
596
%%DATADIR%%/snmpconf-data/snmp-data/debugging
574
%%DATADIR%%/snmpconf-data/snmp-data/debugging

Return to bug 232025