summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiu Yiding <liuyd.fnst@fujitsu.com>2025-12-23 14:10:37 +0800
committerKhem Raj <raj.khem@gmail.com>2025-12-23 12:22:41 -0800
commitafa5d8ed6d741375bdf2421307d42a1f6dbb4a66 (patch)
treec7fd56ecd5261cddc257d2c89645d0db21260691
parenta33d278d089096b6677f50451924c92ea7e58a8c (diff)
downloadmeta-openembedded-afa5d8ed6d741375bdf2421307d42a1f6dbb4a66.tar.gz
net-snmp: upgrade 5.9.4 -> 5.9.5
1.Drop following patches as they were merged upstream. 0001-Android-Fix-the-build.patch 0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch net-snmp-5.9.4-kernel-6.7.patch 0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch 0001-Fix-LDFLAGS-vs-LIBS-ordering.patch 2.Drop 0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch as compile error has been fixed. Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch83
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Fix-LDFLAGS-vs-LIBS-ordering.patch252
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch37
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch46
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch43
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch123
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.5.bb (renamed from meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb)8
7 files changed, 1 insertions, 591 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch
deleted file mode 100644
index 097d9f83cd..0000000000
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Android-Fix-the-build.patch
+++ /dev/null
@@ -1,83 +0,0 @@
1From b4598662a39ff6974119c900ea56a4d020eac366 Mon Sep 17 00:00:00 2001
2From: Bart Van Assche <bvanassche@acm.org>
3Date: Wed, 20 Dec 2023 13:08:06 -0800
4Subject: [PATCH] Android: Fix the build
5
6Include <sys/select.h> for the fd_set type. In the configure script,
7check whether 'unsigned long' is the underlying type of fd_set. Use
8u_long instead of ulong.
9
10Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/b4598662a39ff6974119c900ea56a4d020eac366]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 agent/mibgroup/ip-mib/data_access/ipaddress_linux.c | 4 ++--
14 configure | 2 +-
15 configure.d/config_project_types | 2 +-
16 include/net-snmp/types.h | 3 +++
17 4 files changed, 7 insertions(+), 4 deletions(-)
18
19diff --git a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
20index b38beb57dd..232202d0f9 100644
21--- a/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
22+++ b/agent/mibgroup/ip-mib/data_access/ipaddress_linux.c
23@@ -50,7 +50,7 @@ int _load_v6(netsnmp_container *container, int idx_offset);
24 int
25 netsnmp_access_ipaddress_extra_prefix_info(int index,
26 u_long *preferedlt,
27- ulong *validlt,
28+ u_long *validlt,
29 char *addr);
30 #endif
31
32@@ -523,7 +523,7 @@ out:
33
34 int
35 netsnmp_access_ipaddress_extra_prefix_info(int index, u_long *preferedlt,
36- ulong *validlt, char *addr)
37+ u_long *validlt, char *addr)
38 {
39
40 struct {
41diff --git a/configure b/configure
42index e7bf859bba..48abcbab11 100755
43--- a/configure
44+++ b/configure
45@@ -31577,7 +31577,7 @@ CFLAGS="$CFLAGS -Werror"
46
47 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of fd_set::fds_bits" >&5
48 printf %s "checking for the type of fd_set::fds_bits... " >&6; }
49-for type in __fd_mask __int32_t long\ int unknown; do
50+for type in __fd_mask __int32_t long 'unsigned long' unknown; do
51 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52 /* end confdefs.h. */
53
54diff --git a/configure.d/config_project_types b/configure.d/config_project_types
55index a78e8ebb06..ac958d6712 100644
56--- a/configure.d/config_project_types
57+++ b/configure.d/config_project_types
58@@ -66,7 +66,7 @@ netsnmp_save_CFLAGS=$CFLAGS
59 CFLAGS="$CFLAGS -Werror"
60
61 AC_MSG_CHECKING([for the type of fd_set::fds_bits])
62-for type in __fd_mask __int32_t long\ int unknown; do
63+for type in __fd_mask __int32_t long 'unsigned long' unknown; do
64 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
65 #include <sys/select.h>
66 #include <stddef.h>
67diff --git a/include/net-snmp/types.h b/include/net-snmp/types.h
68index b78f53ffd7..6228170e5f 100644
69--- a/include/net-snmp/types.h
70+++ b/include/net-snmp/types.h
71@@ -23,6 +23,9 @@
72 #endif
73
74 #include <sys/types.h>
75+#ifdef __ANDROID__
76+#include <sys/select.h>
77+#endif
78
79 #if defined(WIN32) && !defined(cygwin)
80 typedef HANDLE netsnmp_pid_t;
81--
822.44.0
83
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Fix-LDFLAGS-vs-LIBS-ordering.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Fix-LDFLAGS-vs-LIBS-ordering.patch
deleted file mode 100644
index 51a63538e4..0000000000
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Fix-LDFLAGS-vs-LIBS-ordering.patch
+++ /dev/null
@@ -1,252 +0,0 @@
1From 10883d754750865e42327826ee90d7eda3741dda Mon Sep 17 00:00:00 2001
2From: Sam James <sam@gentoo.org>
3Date: Fri, 2 Dec 2022 02:26:29 +0000
4Subject: [PATCH] Fix LDFLAGS vs LIBS ordering
5
6LDFLAGS must come before both LIBS & any listed objects in order
7for certain valid LDFLAGS, like '-Wl,--as-needed' to work correctly
8(otherwise it'll either take no effect or discard libraries when
9they're needed).
10
11Gentoo has been carrying this patch for a while.
12
13Signed-off-by: Sam James <sam@gentoo.org>
14Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/72b47b9b41d2640ed4810297f2e26f5eb9d2fa31]
15Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
16---
17 Makefile.top | 4 ++--
18 agent/Makefile.in | 16 ++++++-------
19 agent/helpers/Makefile.in | 2 +-
20 apps/Makefile.in | 46 ++++++++++++++++++------------------
21 apps/snmpnetstat/Makefile.in | 2 +-
22 snmplib/Makefile.in | 4 ++--
23 testing/Makefile.in | 8 +++----
24 7 files changed, 41 insertions(+), 41 deletions(-)
25
26diff --git a/Makefile.top b/Makefile.top
27index 53e0392..5de5648 100644
28--- a/Makefile.top
29+++ b/Makefile.top
30@@ -86,11 +86,11 @@ LIBCURRENT = 42
31 LIBAGE = 2
32 LIBREVISION = 1
33
34-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o
35+LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) $(LDFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) @LD_NO_UNDEFINED@ -o
36 LIB_EXTENSION = la
37 LIB_VERSION =
38 LIB_LDCONFIG_CMD = echo "do not ldconfig\n"
39-LINK = $(LIBTOOL) --mode=link $(LINKCC)
40+LINK = $(LIBTOOL) --mode=link $(LINKCC) $(LDFLAGS)
41 # RANLIB = @RANLIB@
42 RANLIB = :
43
44diff --git a/agent/Makefile.in b/agent/Makefile.in
45index 44f8818..6008eb8 100644
46--- a/agent/Makefile.in
47+++ b/agent/Makefile.in
48@@ -288,26 +288,26 @@ all: agentlib subdirs miblib $(INSTALLBINPROGS) $(INSTALLSBINPROGS)
49 # build stuff targets
50 #
51 getkstat: getkstat.o
52- $(CC) $(CFLAGS) -o $@ $? $(LIBS)
53+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $? $(LIBS)
54
55 getkstat.o: mibgroup/kernel_sunos5.c
56- $(CC) $(CFLAGS) -o $@ -D_GETKSTAT_TEST -DDODEBUG -c $?
57+ $(CC) $(CFLAGS) -o $@ -D_GETKSTAT_TEST -DDODEBUG -c $?
58
59 getmibstat: getmibstat.o
60- $(CC) $(CFLAGS) -o $@ $? $(LIBS)
61+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $? $(LIBS)
62
63 getmibstat.o: mibgroup/kernel_sunos5.c
64- $(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
65+ $(CC) $(CFLAGS) -o $@ -D_GETMIBSTAT_TEST -DDODEBUG -c $?
66
67-snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LIBTARG)
68- $(LINK) $(CFLAGS) -o $@ ${LAGENTOBJS} ${LDFLAGS} ${OUR_AGENT_LIBS}
69+snmpd$(EXEEXT): ${LAGENTOBJS} $(USELIBS) $(AGENTLIB) $(HELPERLIB) $(MIBLIB) $(LIBTARG)
70+ $(LINK) $(CFLAGS) $(LDFLAGS) -o $@ ${LAGENTOBJS} ${OUR_AGENT_LIBS}
71
72 libnetsnmpagent.$(LIB_EXTENSION)$(LIB_VERSION): ${LLIBAGENTOBJS} $(USELIBS)
73- $(LIB_LD_CMD) $(AGENTLIB) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(LDFLAGS) $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
74+ $(LIB_LD_CMD) $(AGENTLIB) $(LDFLAGS) ${LLIBAGENTOBJS} $(USELIBS) ${LAGENTLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
75 $(RANLIB) $(AGENTLIB)
76
77 libnetsnmpmibs.$(LIB_EXTENSION)$(LIB_VERSION): ${LMIBOBJS} $(AGENTLIB) $(USELIBS) subdirs
78- $(LIB_LD_CMD) $(MIBLIB) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) $(LDFLAGS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
79+ $(LIB_LD_CMD) $(MIBLIB) $(LDFLAGS) ${LMIBOBJS} $(AGENTLIB) $(USELIBS) ${LMIBLIBS} $(PERLLDOPTS_FOR_LIBS) @AGENTLIBS@
80 $(RANLIB) $(MIBLIB)
81
82 agentlib: $(AGENTLIB)
83diff --git a/agent/helpers/Makefile.in b/agent/helpers/Makefile.in
84index 51f409d..05a9adc 100644
85--- a/agent/helpers/Makefile.in
86+++ b/agent/helpers/Makefile.in
87@@ -32,5 +32,5 @@ LOBJS = dummy.lo
88 all: standardall
89
90 libnetsnmphelpers.$(LIB_EXTENSION)$(LIB_VERSION): $(LOBJS)
91- $(LIB_LD_CMD) $@ $(LOBJS) $(LDFLAGS)
92+ $(LIB_LD_CMD) $@ $(LDFLAGS) $(LOBJS)
93 $(RANLIB) $@
94diff --git a/apps/Makefile.in b/apps/Makefile.in
95index 57b8524..b5b26f9 100644
96--- a/apps/Makefile.in
97+++ b/apps/Makefile.in
98@@ -161,37 +161,37 @@ OTHERUNINSTALL=snmpinformuninstall snmptrapdperluninstall \
99 # build rules
100 #
101 snmpwalk$(EXEEXT): snmpwalk.$(OSUFFIX) $(USELIBS)
102- $(LINK) ${CFLAGS} -o $@ snmpwalk.$(OSUFFIX) ${LDFLAGS} ${LIBS}
103+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpwalk.$(OSUFFIX) ${LIBS}
104
105 snmpbulkwalk$(EXEEXT): snmpbulkwalk.$(OSUFFIX) $(USELIBS)
106- $(LINK) ${CFLAGS} -o $@ snmpbulkwalk.$(OSUFFIX) ${LDFLAGS} ${LIBS}
107+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpbulkwalk.$(OSUFFIX) ${LIBS}
108
109 snmpbulkget$(EXEEXT): snmpbulkget.$(OSUFFIX) $(USELIBS)
110- $(LINK) ${CFLAGS} -o $@ snmpbulkget.$(OSUFFIX) ${LDFLAGS} ${LIBS}
111+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpbulkget.$(OSUFFIX) ${LIBS}
112
113 snmptranslate$(EXEEXT): snmptranslate.$(OSUFFIX) $(USELIBS)
114- $(LINK) ${CFLAGS} -o $@ snmptranslate.$(OSUFFIX) ${LDFLAGS} ${LIBS}
115+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmptranslate.$(OSUFFIX) ${LIBS}
116
117 snmpstatus$(EXEEXT): snmpstatus.$(OSUFFIX) $(USELIBS)
118- $(LINK) ${CFLAGS} -o $@ snmpstatus.$(OSUFFIX) ${LDFLAGS} ${LIBS}
119+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpstatus.$(OSUFFIX) ${LIBS}
120
121 snmpget$(EXEEXT): snmpget.$(OSUFFIX) $(USELIBS)
122- $(LINK) ${CFLAGS} -o $@ snmpget.$(OSUFFIX) ${LDFLAGS} ${LIBS}
123+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpget.$(OSUFFIX) ${LIBS}
124
125 snmpdelta$(EXEEXT): snmpdelta.$(OSUFFIX) $(USELIBS)
126- $(LINK) ${CFLAGS} -o $@ snmpdelta.$(OSUFFIX) ${LDFLAGS} ${LIBS}
127+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpdelta.$(OSUFFIX) ${LIBS}
128
129 snmptable$(EXEEXT): snmptable.$(OSUFFIX) $(USELIBS)
130- $(LINK) ${CFLAGS} -o $@ snmptable.$(OSUFFIX) ${LDFLAGS} ${LIBS}
131+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmptable.$(OSUFFIX) ${LIBS}
132
133 snmptest$(EXEEXT): snmptest.$(OSUFFIX) $(USELIBS)
134- $(LINK) ${CFLAGS} -o $@ snmptest.$(OSUFFIX) ${LDFLAGS} ${LIBS}
135+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmptest.$(OSUFFIX) ${LIBS}
136
137 snmptrapd$(EXEEXT): $(TRAPD_OBJECTS) $(USETRAPLIBS) $(INSTALLLIBS)
138- $(LINK) ${CFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${LDFLAGS} ${TRAPLIBS}
139+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ $(TRAPD_OBJECTS) $(INSTALLLIBS) ${TRAPLIBS}
140
141 snmptrap$(EXEEXT): snmptrap.$(OSUFFIX) $(USELIBS)
142- $(LINK) ${CFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LDFLAGS} ${LIBS}
143+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmptrap.$(OSUFFIX) ${LIBS}
144
145 snmpinform$(EXEEXT): snmptrap$(EXEEXT)
146 rm -f snmpinform
147@@ -202,40 +202,40 @@ snmptop$(EXEEXT): snmpps$(EXEEXT)
148 $(LN_S) snmpps$(EXEEXT) snmptop$(EXEEXT)
149
150 snmpset$(EXEEXT): snmpset.$(OSUFFIX) $(USELIBS)
151- $(LINK) ${CFLAGS} -o $@ snmpset.$(OSUFFIX) ${LDFLAGS} ${LIBS}
152+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpset.$(OSUFFIX) ${LIBS}
153
154 snmpusm$(EXEEXT): snmpusm.$(OSUFFIX) $(USELIBS)
155- $(LINK) ${CFLAGS} -o $@ snmpusm.$(OSUFFIX) ${LDFLAGS} ${LIBS}
156+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpusm.$(OSUFFIX) ${LIBS}
157
158 snmpvacm$(EXEEXT): snmpvacm.$(OSUFFIX) $(USELIBS)
159- $(LINK) ${CFLAGS} -o $@ snmpvacm.$(OSUFFIX) ${LDFLAGS} ${LIBS}
160+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpvacm.$(OSUFFIX) ${LIBS}
161
162 snmptls$(EXEEXT): snmptls.$(OSUFFIX) $(USELIBS)
163- $(LINK) ${CFLAGS} -o $@ snmptls.$(OSUFFIX) ${LDFLAGS} ${LIBS}
164+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmptls.$(OSUFFIX) ${LIBS}
165
166 agentxtrap$(EXEEXT): agentxtrap.$(OSUFFIX) $(USEAGENTLIBS)
167- $(LINK) ${CFLAGS} -o $@ agentxtrap.$(OSUFFIX) ${LDFLAGS} $(USEAGENTLIBS) $(PERLLDOPTS_FOR_APPS) ${LIBS}
168+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ agentxtrap.$(OSUFFIX) $(USEAGENTLIBS) $(PERLLDOPTS_FOR_APPS) ${LIBS}
169
170 snmpgetnext$(EXEEXT): snmpgetnext.$(OSUFFIX) $(USELIBS)
171- $(LINK) ${CFLAGS} -o $@ snmpgetnext.$(OSUFFIX) ${LDFLAGS} ${LIBS}
172+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpgetnext.$(OSUFFIX) ${LIBS}
173
174 encode_keychange$(EXEEXT): encode_keychange.$(OSUFFIX) $(USELIBS)
175- $(LINK) ${CFLAGS} -o $@ encode_keychange.$(OSUFFIX) ${LDFLAGS} ${LIBS}
176+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ encode_keychange.$(OSUFFIX) ${LIBS}
177
178 snmpdf$(EXEEXT): snmpdf.$(OSUFFIX) $(USELIBS)
179- $(LINK) ${CFLAGS} -o $@ snmpdf.$(OSUFFIX) ${LDFLAGS} ${LIBS}
180+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpdf.$(OSUFFIX) ${LIBS}
181
182 snmpps$(EXEEXT): snmpps.$(OSUFFIX) $(USELIBS)
183- $(LINK) ${CFLAGS} -o $@ snmpps.$(OSUFFIX) ${LDFLAGS} @LIBCURSES@ ${LIBS}
184+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpps.$(OSUFFIX) @LIBCURSES@ ${LIBS}
185
186 snmpping$(EXEEXT): snmpping.$(OSUFFIX) $(USELIBS)
187- $(LINK) ${CFLAGS} -o $@ snmpping.$(OSUFFIX) ${LDFLAGS} ${LIBS} -lm
188+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmpping.$(OSUFFIX) ${LIBS} -lm
189
190 snmppcap$(EXEEXT): snmppcap.$(OSUFFIX) $(USEAGENTLIBS)
191- $(LINK) ${CFLAGS} -o $@ snmppcap.$(OSUFFIX) ${LDFLAGS} ${USEAGENTLIBS} ${LIBS} -lpcap
192+ $(LINK) ${CFLAGS} ${LDFLAGS} -o $@ snmppcap.$(OSUFFIX) ${USEAGENTLIBS} ${LIBS} -lpcap
193
194 libnetsnmptrapd.$(LIB_EXTENSION)$(LIB_VERSION): $(LLIBTRAPD_OBJS)
195- $(LIB_LD_CMD) $@ ${LLIBTRAPD_OBJS} $(MIBLIB) $(MYSQL_LIBS) $(USELIBS) $(PERLLDOPTS_FOR_LIBS) $(LDFLAGS)
196+ $(LIB_LD_CMD) $@ $(LDFLAGS) ${LLIBTRAPD_OBJS} $(MIBLIB) $(MYSQL_LIBS) $(USELIBS) $(PERLLDOPTS_FOR_LIBS)
197 $(RANLIB) $@
198
199 snmpinforminstall:
200diff --git a/apps/snmpnetstat/Makefile.in b/apps/snmpnetstat/Makefile.in
201index dfb566d..8a8cb21 100644
202--- a/apps/snmpnetstat/Makefile.in
203+++ b/apps/snmpnetstat/Makefile.in
204@@ -34,4 +34,4 @@ LIBS= ../../snmplib/libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION) $(VAL_LIBS) @LIBS
205 all: standardall
206
207 snmpnetstat$(EXEEXT): ${LOBJS} ${USELIBS}
208- ${LINK} ${CFLAGS} -o $@ ${LOBJS} ${LOCAL_LIBS} ${LDFLAGS} ${LIBS}
209+ ${LINK} ${CFLAGS} ${LDFLAGS} -o $@ ${LOBJS} ${LOCAL_LIBS} ${LIBS}
210diff --git a/snmplib/Makefile.in b/snmplib/Makefile.in
211index ecbfc4d..1501636 100644
212--- a/snmplib/Makefile.in
213+++ b/snmplib/Makefile.in
214@@ -230,11 +230,11 @@ all: standardall
215
216 # how to build the libraries.
217 libnetsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS)
218- $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@
219+ $(LIB_LD_CMD) $@ $(LDFLAGS) $(TOBJS) @LNETSNMPLIBS@
220 $(RANLIB) $@
221
222 libsnmp.$(LIB_EXTENSION)$(LIB_VERSION): $(TOBJS)
223- $(LIB_LD_CMD) $@ $(TOBJS) $(LDFLAGS) @LNETSNMPLIBS@
224+ $(LIB_LD_CMD) $@ $(LDFLAGS) $(TOBJS) @LNETSNMPLIBS@
225 $(RANLIB) $@
226
227 #
228diff --git a/testing/Makefile.in b/testing/Makefile.in
229index 79d069d..a6d920e 100644
230--- a/testing/Makefile.in
231+++ b/testing/Makefile.in
232@@ -61,16 +61,16 @@ test-mibs:
233 cd $(srcdir)/rfc1213 ; ./run
234
235 etest: etimetest.o $(PARSEOBJS) $(USELIBS)
236- ${CC} -o $@ etimetest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
237+ ${CC} ${LDFLAGS} -o $@ etimetest.o $(PARSEOBJS) ${LIBS}
238
239 ktest: keymanagetest.o $(PARSEOBJS) $(USELIBS)
240- ${CC} -o $@ keymanagetest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
241+ ${CC} ${LDFLAGS} -o $@ keymanagetest.o $(PARSEOBJS) ${LIBS}
242
243 misctest: misctest.o $(PARSEOBJS) $(USELIBS)
244- ${CC} -o $@ misctest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
245+ ${CC} ${LDFLAGS} -o $@ misctest.o $(PARSEOBJS) ${LIBS}
246
247 stest: scapitest.o $(PARSEOBJS) $(USELIBS)
248- ${CC} -o $@ scapitest.o $(PARSEOBJS) ${LDFLAGS} ${LIBS}
249+ ${CC} ${LDFLAGS} -o $@ scapitest.o $(PARSEOBJS) ${LIBS}
250
251 clean: testclean
252 rm -f *.o core *.core $(TARG)
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch
deleted file mode 100644
index 7a6b35460e..0000000000
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From c790411f9aa82064fea9bbf23b499fb6b7f22c4f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 18 Sep 2015 00:28:45 -0400
4Subject: [PATCH] snmplib/keytools.c: Don't check for return from
5 EVP_MD_CTX_init()
6
7EVP_MD_CTX_init() API returns void, it fixes errors with new compilers
8
9snmplib/keytools.c: In function 'generate_Ku': error: invalid use of void expression
10
11Upstream-Status: Pending
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
15---
16 snmplib/keytools.c | 5 +----
17 1 file changed, 1 insertion(+), 4 deletions(-)
18
19diff --git a/snmplib/keytools.c b/snmplib/keytools.c
20index 388e655..5a66898 100644
21--- a/snmplib/keytools.c
22+++ b/snmplib/keytools.c
23@@ -183,10 +183,7 @@ generate_Ku(const oid * hashtype, u_int hashtype_len,
24 ctx = EVP_MD_CTX_create();
25 #else
26 ctx = malloc(sizeof(*ctx));
27- if (!EVP_MD_CTX_init(ctx)) {
28- rval = SNMPERR_GENERR;
29- goto generate_Ku_quit;
30- }
31+ EVP_MD_CTX_init(ctx);
32 #endif
33 if (!EVP_DigestInit(ctx, hashfn)) {
34 rval = SNMPERR_GENERR;
35--
362.25.1
37
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch
deleted file mode 100644
index a57c4c8f14..0000000000
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From b5cbe0953a7e7a3c77c7ec69dfe81254475f08c0 Mon Sep 17 00:00:00 2001
2From: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
3Date: Wed, 9 Jun 2021 15:47:30 +0900
4Subject: [PATCH] net snmp: fix engineBoots value on SIGHUP
5
6Upstream-Status: Pending
7
8Signed-off-by: Marian Florea <marian.florea@windriver.com>
9Signed-off-by: Li Zhou <li.zhou@windriver.com>
10Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
11---
12 agent/snmpd.c | 1 +
13 snmplib/snmpv3.c | 4 ++--
14 2 files changed, 3 insertions(+), 2 deletions(-)
15
16diff --git a/agent/snmpd.c b/agent/snmpd.c
17index fe31c87..d9f68dd 100644
18--- a/agent/snmpd.c
19+++ b/agent/snmpd.c
20@@ -1169,6 +1169,7 @@ snmpd_reconfig(void)
21 snmp_log(LOG_INFO, "NET-SNMP version %s restarted\n",
22 netsnmp_get_version());
23 update_config();
24+ snmp_store(app_name);
25 send_easy_trap(SNMP_TRAP_ENTERPRISESPECIFIC, 3);
26 #ifdef HAVE_SIGPROCMASK
27 ret = sigprocmask(SIG_UNBLOCK, &set, NULL);
28diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c
29index be9256f..d17d2e3 100644
30--- a/snmplib/snmpv3.c
31+++ b/snmplib/snmpv3.c
32@@ -1071,9 +1071,9 @@ init_snmpv3_post_config(int majorid, int minorid, void *serverarg,
33 /*
34 * if our engineID has changed at all, the boots record must be set to 1
35 */
36- if (engineIDLen != oldEngineIDLength ||
37+ if (oldEngineIDLength != (size_t)0 && (engineIDLen != oldEngineIDLength ||
38 oldEngineID == NULL || c_engineID == NULL ||
39- memcmp(oldEngineID, c_engineID, engineIDLen) != 0) {
40+ memcmp(oldEngineID, c_engineID, engineIDLen) != 0)) {
41 engineBoots = 1;
42 }
43
44--
452.25.1
46
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch
deleted file mode 100644
index 9d4b769930..0000000000
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 21ea0b9ce5cc9445f7ffd7a9020b816681e16284 Mon Sep 17 00:00:00 2001
2From: Adam Gajda <adgajda@users.noreply.github.com>
3Date: Mon, 2 Oct 2023 16:40:31 +0200
4Subject: [PATCH] Fix configuration of NETSNMP_FD_MASK_TYPE
5
6Upstream-Status: Backport
7[https://github.com/net-snmp/net-snmp/commit/af1b7f77975bbb2fcbdb3f005f8cb010d1d33cd3]
8
9Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
10---
11 configure | 2 +-
12 configure.d/config_project_types | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/configure b/configure
16index 907d441..f4468c6 100755
17--- a/configure
18+++ b/configure
19@@ -31638,7 +31638,7 @@ CFLAGS="$CFLAGS -Werror"
20
21 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the type of fd_set::fds_bits" >&5
22 printf %s "checking for the type of fd_set::fds_bits... " >&6; }
23-for type in __fd_mask __int32_t unknown; do
24+for type in __fd_mask __int32_t long\ int unknown; do
25 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26 /* end confdefs.h. */
27
28diff --git a/configure.d/config_project_types b/configure.d/config_project_types
29index 1b4c66b..a78e8eb 100644
30--- a/configure.d/config_project_types
31+++ b/configure.d/config_project_types
32@@ -66,7 +66,7 @@ netsnmp_save_CFLAGS=$CFLAGS
33 CFLAGS="$CFLAGS -Werror"
34
35 AC_MSG_CHECKING([for the type of fd_set::fds_bits])
36-for type in __fd_mask __int32_t unknown; do
37+for type in __fd_mask __int32_t long\ int unknown; do
38 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
39 #include <sys/select.h>
40 #include <stddef.h>
41--
422.25.1
43
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch
deleted file mode 100644
index 9111ed8ae2..0000000000
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.9.4-kernel-6.7.patch
+++ /dev/null
@@ -1,123 +0,0 @@
1From f5ae6baf0018abda9dedc368fe6d52c0d7a8ab8f Mon Sep 17 00:00:00 2001
2From: Philippe Troin <phil+github-commits@fifi.org>
3Date: Sat, 3 Feb 2024 10:30:30 -0800
4Subject: [PATCH] Add Linux 6.7 compatibility parsing /proc/net/snmp
5
6Linux 6.7 adds a new OutTransmits field to Ip in /proc/net/snmp.
7This breaks the hard-coded assumptions about the Ip line length.
8Add compatibility to parse Linux 6.7 Ip header while keep support
9for previous versions.
10
11Upstream-Status: Backport [https://github.com/net-snmp/net-snmp/commit/49d60ba57f4b462df7dc5fd5b38b4425dab0982c]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 .../ip-mib/data_access/systemstats_linux.c | 46 +++++++++++++++----
15 1 file changed, 37 insertions(+), 9 deletions(-)
16
17diff --git a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
18index 49e0a34d5c..f04e828a94 100644
19--- a/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
20+++ b/agent/mibgroup/ip-mib/data_access/systemstats_linux.c
21@@ -36,7 +36,7 @@ netsnmp_access_systemstats_arch_init(void)
22 }
23
24 /*
25- /proc/net/snmp
26+ /proc/net/snmp - Linux 6.6 and lower
27
28 Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates
29 Ip: 2 64 7083534 0 0 0 0 0 6860233 6548963 0 0 1 286623 63322 1 259920 0 0
30@@ -49,6 +49,26 @@ netsnmp_access_systemstats_arch_init(void)
31
32 Udp: InDatagrams NoPorts InErrors OutDatagrams
33 Udp: 1491094 122 0 1466178
34+*
35+ /proc/net/snmp - Linux 6.7 and higher
36+
37+ Ip: Forwarding DefaultTTL InReceives InHdrErrors InAddrErrors ForwDatagrams InUnknownProtos InDiscards InDelivers OutRequests OutDiscards OutNoRoutes ReasmTimeout ReasmReqds ReasmOKs ReasmFails FragOKs FragFails FragCreates OutTransmits
38+ Ip: 1 64 50859058 496 0 37470604 0 0 20472980 7515791 1756 0 0 7264 3632 0 3548 0 7096 44961424
39+
40+ Icmp: InMsgs InErrors InCsumErrors InDestUnreachs InTimeExcds InParmProbs InSrcQuenchs InRedirects InEchos InEchoReps InTimestamps InTimestampReps InAddrMasks InAddrMaskReps OutMsgs OutErrors OutRateLimitGlobal OutRateLimitHost OutDestUnreachs OutTimeExcds OutParmProbs OutSrcQuenchs OutRedirects OutEchos OutEchoReps OutTimestamps OutTimestampReps OutAddrMasks OutAddrMaskReps
41+ Icmp: 114447 2655 0 17589 0 0 0 0 66905 29953 0 0 0 0 143956 0 0 572 16610 484 0 0 0 59957 66905 0 0 0 0
42+
43+ IcmpMsg: InType0 InType3 InType8 OutType0 OutType3 OutType8 OutType11
44+ IcmpMsg: 29953 17589 66905 66905 16610 59957 484
45+
46+ Tcp: RtoAlgorithm RtoMin RtoMax MaxConn ActiveOpens PassiveOpens AttemptFails EstabResets CurrEstab InSegs OutSegs RetransSegs InErrs OutRsts InCsumErrors
47+ Tcp: 1 200 120000 -1 17744 13525 307 3783 6 18093137 9277788 3499 8 7442 0
48+
49+ Udp: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti MemErrors
50+ Udp: 2257832 1422 0 2252835 0 0 0 84 0
51+
52+ UdpLite: InDatagrams NoPorts InErrors OutDatagrams RcvbufErrors SndbufErrors InCsumErrors IgnoredMulti MemErrors
53+ UdpLite: 0 0 0 0 0 0 0 0 0
54 */
55
56
57@@ -101,10 +121,10 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
58 FILE *devin;
59 char line[1024];
60 netsnmp_systemstats_entry *entry = NULL;
61- int scan_count;
62+ int scan_count, expected_scan_count;
63 char *stats, *start = line;
64 int len;
65- unsigned long long scan_vals[19];
66+ unsigned long long scan_vals[20];
67
68 DEBUGMSGTL(("access:systemstats:container:arch", "load v4 (flags %x)\n",
69 load_flags));
70@@ -126,10 +146,17 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
71 */
72 NETSNMP_IGNORE_RESULT(fgets(line, sizeof(line), devin));
73 len = strlen(line);
74- if (224 != len) {
75+ switch (len) {
76+ case 224:
77+ expected_scan_count = 19;
78+ break;
79+ case 237:
80+ expected_scan_count = 20;
81+ break;
82+ default:
83 fclose(devin);
84 snmp_log(LOG_ERR, "systemstats_linux: unexpected header length in /proc/net/snmp."
85- " %d != 224\n", len);
86+ " %d not in { 224, 237 } \n", len);
87 return -4;
88 }
89
90@@ -178,20 +205,20 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
91 memset(scan_vals, 0x0, sizeof(scan_vals));
92 scan_count = sscanf(stats,
93 "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu"
94- "%llu %llu %llu %llu %llu %llu %llu %llu %llu",
95+ "%llu %llu %llu %llu %llu %llu %llu %llu %llu %llu",
96 &scan_vals[0],&scan_vals[1],&scan_vals[2],
97 &scan_vals[3],&scan_vals[4],&scan_vals[5],
98 &scan_vals[6],&scan_vals[7],&scan_vals[8],
99 &scan_vals[9],&scan_vals[10],&scan_vals[11],
100 &scan_vals[12],&scan_vals[13],&scan_vals[14],
101 &scan_vals[15],&scan_vals[16],&scan_vals[17],
102- &scan_vals[18]);
103+ &scan_vals[18],&scan_vals[19]);
104 DEBUGMSGTL(("access:systemstats", " read %d values\n", scan_count));
105
106- if(scan_count != 19) {
107+ if(scan_count != expected_scan_count) {
108 snmp_log(LOG_ERR,
109 "error scanning systemstats data (expected %d, got %d)\n",
110- 19, scan_count);
111+ expected_scan_count, scan_count);
112 netsnmp_access_systemstats_entry_free(entry);
113 return -4;
114 }
115@@ -223,6 +250,7 @@ _systemstats_v4(netsnmp_container* container, u_int load_flags)
116 entry->stats.HCOutFragFails.high = scan_vals[17] >> 32;
117 entry->stats.HCOutFragCreates.low = scan_vals[18] & 0xffffffff;
118 entry->stats.HCOutFragCreates.high = scan_vals[18] >> 32;
119+ /* entry->stats. = scan_vals[19]; / * OutTransmits */
120
121 entry->stats.columnAvail[IPSYSTEMSTATSTABLE_HCINRECEIVES] = 1;
122 entry->stats.columnAvail[IPSYSTEMSTATSTABLE_INHDRERRORS] = 1;
123
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.5.bb
index 44a3cfc745..f4108d9715 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.4.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.5.bb
@@ -19,20 +19,14 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
19 file://0002-net-snmp-fix-libtool-finish.patch \ 19 file://0002-net-snmp-fix-libtool-finish.patch \
20 file://0003-testing-add-the-output-format-for-ptest.patch \ 20 file://0003-testing-add-the-output-format-for-ptest.patch \
21 file://0004-config_os_headers-Error-Fix.patch \ 21 file://0004-config_os_headers-Error-Fix.patch \
22 file://0005-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \
23 file://0006-get_pid_from_inode-Include-limit.h.patch \ 22 file://0006-get_pid_from_inode-Include-limit.h.patch \
24 file://0007-configure-fix-incorrect-variable.patch \ 23 file://0007-configure-fix-incorrect-variable.patch \
25 file://0008-net-snmp-fix-engineBoots-value-on-SIGHUP.patch \
26 file://0009-net-snmp-fix-for-disable-des.patch \ 24 file://0009-net-snmp-fix-for-disable-des.patch \
27 file://0010-net-snmp-Reproducibility-Don-t-check-build-host-for.patch \ 25 file://0010-net-snmp-Reproducibility-Don-t-check-build-host-for.patch \
28 file://0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch \ 26 file://0011-ac_add_search_path.m4-keep-consistent-between-32bit-.patch \
29 file://0012-Fix-configuration-of-NETSNMP_FD_MASK_TYPE.patch \
30 file://0001-Android-Fix-the-build.patch \
31 file://netsnmp-swinst-crash.patch \ 27 file://netsnmp-swinst-crash.patch \
32 file://net-snmp-5.9.4-kernel-6.7.patch \
33 file://0001-Fix-LDFLAGS-vs-LIBS-ordering.patch \
34 " 28 "
35SRC_URI[sha256sum] = "8b4de01391e74e3c7014beb43961a2d6d6fa03acc34280b9585f4930745b0544" 29SRC_URI[sha256sum] = "07f94f06a8d681485e43eeec4f190d9bea43e1b335146d0de466b6de3f3f4c5a"
36 30
37UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/" 31UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/net-snmp/files/net-snmp/"
38UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/" 32UPSTREAM_CHECK_REGEX = "/net-snmp/(?P<pver>\d+(\.\d+)+)/"