* [ptxdist] [PATCH] net-snmp: version bump to 5.7.3 LTS
@ 2015-06-25 9:11 Oliver Graute
2015-07-01 8:23 ` Michael Olbrich
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Graute @ 2015-06-25 9:11 UTC (permalink / raw)
To: ptxdist; +Cc: Oliver Graute
Version bump to net-snmp version 5.7.3
Signed-off-by: Oliver Graute <oliver.graute@neuhaus.de>
---
...m-fenner-fix-ICMP-mib-table-handling-on-l.patch | 148 ++++++++++++++++++++
.../0200-net-snmp-config-add-SYSROOT-support.patch | 52 +++++++
...le-udp-and-tcp-when-disable-agentx-dom-so.patch | 37 +++++
patches/net-snmp-5.7.3/autogen.sh | 1 +
patches/net-snmp-5.7.3/series | 8 ++
rules/net-snmp.make | 4 +-
6 files changed, 248 insertions(+), 2 deletions(-)
create mode 100644 patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
create mode 100644 patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch
create mode 100644 patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
create mode 120000 patches/net-snmp-5.7.3/autogen.sh
create mode 100644 patches/net-snmp-5.7.3/series
diff --git a/patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch b/patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
new file mode 100644
index 0000000..b0b2da8
--- /dev/null
+++ b/patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
@@ -0,0 +1,148 @@
+From: Wes Hardaker <hardaker@users.sourceforge.net>
+Date: Wed, 19 Feb 2014 15:21:57 -0800
+Subject: [PATCH] bug fix from fenner: fix ICMP mib table handling on linux
+
+---
+ agent/mibgroup/mibII/icmp.c | 25 +++++++++++++++++++++++--
+ agent/mibgroup/mibII/kernel_linux.c | 19 +++++++++++++------
+ agent/mibgroup/mibII/kernel_linux.h | 4 ++--
+ 3 files changed, 38 insertions(+), 10 deletions(-)
+
+diff --git a/agent/mibgroup/mibII/icmp.c b/agent/mibgroup/mibII/icmp.c
+index 14c73a6..6d10426 100644
+--- a/agent/mibgroup/mibII/icmp.c
++++ b/agent/mibgroup/mibII/icmp.c
+@@ -106,10 +106,20 @@ struct icmp_msg_stats_table_entry {
+ int flags;
+ };
+
++#ifdef linux
++/* Linux keeps track of all possible message types */
++#define ICMP_MSG_STATS_IPV4_COUNT 256
++#else
+ #define ICMP_MSG_STATS_IPV4_COUNT 11
++#endif
+
+ #ifdef NETSNMP_ENABLE_IPV6
++#ifdef linux
++/* Linux keeps track of all possible message types */
++#define ICMP_MSG_STATS_IPV6_COUNT 256
++#else
+ #define ICMP_MSG_STATS_IPV6_COUNT 14
++#endif
+ #else
+ #define ICMP_MSG_STATS_IPV6_COUNT 0
+ #endif /* NETSNMP_ENABLE_IPV6 */
+@@ -177,7 +187,7 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
+ inc = 0;
+ linux_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
+ if (flag) {
+- while (254 != k) {
++ while (255 >= k) {
+ if (v4icmpmsg.vals[k].InType) {
+ icmp_msg_stats_table[i].ipVer = 1;
+ icmp_msg_stats_table[i].icmpMsgStatsType = k;
+@@ -267,7 +277,7 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
+ inc = 0;
+ linux_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
+ if (flag) {
+- while (254 != k) {
++ while (255 >= k) {
+ if (v6icmpmsg.vals[k].InType) {
+ icmp_msg_stats_table[i].ipVer = 2;
+ icmp_msg_stats_table[i].icmpMsgStatsType = k;
+@@ -1050,6 +1060,12 @@ icmp_stats_table_handler(netsnmp_mib_handler *handler,
+ continue;
+ table_info = netsnmp_extract_table_info(request);
+ subid = table_info->colnum;
++ DEBUGMSGTL(( "mibII/icmpStatsTable", "oid: " ));
++ DEBUGMSGOID(( "mibII/icmpStatsTable", request->requestvb->name,
++ request->requestvb->name_length ));
++ DEBUGMSG(( "mibII/icmpStatsTable", " In %d InErr %d Out %d OutErr %d\n",
++ entry->icmpStatsInMsgs, entry->icmpStatsInErrors,
++ entry->icmpStatsOutMsgs, entry->icmpStatsOutErrors ));
+
+ switch (subid) {
+ case ICMP_STAT_INMSG:
+@@ -1117,6 +1133,11 @@ icmp_msg_stats_table_handler(netsnmp_mib_handler *handler,
+ continue;
+ table_info = netsnmp_extract_table_info(request);
+ subid = table_info->colnum;
++ DEBUGMSGTL(( "mibII/icmpMsgStatsTable", "oid: " ));
++ DEBUGMSGOID(( "mibII/icmpMsgStatsTable", request->requestvb->name,
++ request->requestvb->name_length ));
++ DEBUGMSG(( "mibII/icmpMsgStatsTable", " In %d Out %d Flags 0x%x\n",
++ entry->icmpMsgStatsInPkts, entry->icmpMsgStatsOutPkts, entry->flags ));
+
+ switch (subid) {
+ case ICMP_MSG_STAT_IN_PKTS:
+diff --git a/agent/mibgroup/mibII/kernel_linux.c b/agent/mibgroup/mibII/kernel_linux.c
+index b21a166..ba320c7 100644
+--- a/agent/mibgroup/mibII/kernel_linux.c
++++ b/agent/mibgroup/mibII/kernel_linux.c
+@@ -81,9 +81,9 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg)
+ index = strtol(token, &delim, 0);
+ if (ERANGE == errno) {
+ continue;
+- } else if (index > LONG_MAX) {
++ } else if (index > 255) {
+ continue;
+- } else if (index < LONG_MIN) {
++ } else if (index < 0) {
+ continue;
+ }
+ if (NULL == (token = strtok_r(dataptr, " ", &saveptr1)))
+@@ -94,9 +94,9 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg)
+ index = strtol(token, &delim, 0);
+ if (ERANGE == errno) {
+ continue;
+- } else if (index > LONG_MAX) {
++ } else if (index > 255) {
+ continue;
+- } else if (index < LONG_MIN) {
++ } else if (index < 0) {
+ continue;
+ }
+ if(NULL == (token = strtok_r(dataptr, " ", &saveptr1)))
+@@ -426,14 +426,21 @@ linux_read_icmp6_parse(struct icmp6_mib *icmp6stat,
+
+ vals = name;
+ if (NULL != icmp6msgstat) {
++ int type;
+ if (0 == strncmp(name, "Icmp6OutType", 12)) {
+ strsep(&vals, "e");
+- icmp6msgstat->vals[atoi(vals)].OutType = stats;
++ type = atoi(vals);
++ if ( type < 0 || type > 255 )
++ continue;
++ icmp6msgstat->vals[type].OutType = stats;
+ *support = 1;
+ continue;
+ } else if (0 == strncmp(name, "Icmp6InType", 11)) {
+ strsep(&vals, "e");
+- icmp6msgstat->vals[atoi(vals)].InType = stats;
++ type = atoi(vals);
++ if ( type < 0 || type > 255 )
++ continue;
++ icmp6msgstat->vals[type].InType = stats;
+ *support = 1;
+ continue;
+ }
+diff --git a/agent/mibgroup/mibII/kernel_linux.h b/agent/mibgroup/mibII/kernel_linux.h
+index 6bf5d47..c6dfca9 100644
+--- a/agent/mibgroup/mibII/kernel_linux.h
++++ b/agent/mibgroup/mibII/kernel_linux.h
+@@ -121,11 +121,11 @@ struct icmp_msg_mib {
+
+ /* Lets use wrapper structures for future expansion */
+ struct icmp4_msg_mib {
+- struct icmp_msg_mib vals[255];
++ struct icmp_msg_mib vals[256];
+ };
+
+ struct icmp6_msg_mib {
+- struct icmp_msg_mib vals[255];
++ struct icmp_msg_mib vals[256];
+ };
+
+ struct udp_mib {
diff --git a/patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch b/patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch
new file mode 100644
index 0000000..9c46268
--- /dev/null
+++ b/patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch
@@ -0,0 +1,52 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Date: Sun, 10 Jan 2010 00:33:45 +0100
+Subject: [PATCH] net-snmp-config; add SYSROOT support
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
+
+Adapted to 5.6.1
+
+Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
+
+Adapted to 5.7.2
+
+Signed-off-by: Alexander Dahl <post@lespocky.de>
+---
+ net-snmp-config.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/net-snmp-config.in b/net-snmp-config.in
+index 2300fe1..361c658 100644
+--- a/net-snmp-config.in
++++ b/net-snmp-config.in
+@@ -54,7 +54,7 @@ NSC_LAGENTLIBS="@LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@"
+ NSC_LMIBLIBS="@LMIBLIBS@"
+
+ NSC_INCLUDEDIR=${includedir}
+-NSC_LIBDIR=-L${libdir}
++NSC_LIBDIR=-L${SYSROOT}${libdir}
+
+ NSC_SNMPLIBS="-lnetsnmp ${NSC_LNETSNMPLIBS}"
+ NSC_SUBAGENTLIBS="-lnetsnmpagent ${NSC_LAGENTLIBS} ${NSC_SNMPLIBS}"
+@@ -138,10 +138,10 @@ else
+ ;;
+ #################################################### compile
+ --base-cflags)
+- echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
++ echo @CFLAGS@ @CPPFLAGS@ -I${SYSROOT}${NSC_INCLUDEDIR}
+ ;;
+ --cflags|--cf*)
+- echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR}
++ echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${SYSROOT}${NSC_INCLUDEDIR}
+ ;;
+ --srcdir)
+ echo $NSC_SRCDIR
+@@ -598,7 +598,7 @@ EOF
+ echo "Ack. Can't create $tmpfile."
+ exit 1
+ fi
+- cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
++ cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${SYSROOT}${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
+ echo "running: $cmd"
+ `$cmd`
+ if test "x$norm" != "x1" ; then
diff --git a/patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch b/patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
new file mode 100644
index 0000000..fb7be8c
--- /dev/null
+++ b/patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
@@ -0,0 +1,37 @@
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Tue, 3 Sep 2013 21:12:46 +0200
+Subject: [PATCH] Don't disable udp and tcp when
+ --disable-agentx-dom-sock-only is given
+
+The configure magic without this patch treats all
+
+ --enable-agentx-dom-sock-only
+ --enable-agentx-dom-sock-only=no
+ --disable-agentx-dom-sock-only
+
+the same; i.e. disables the udp and tcp transports. With this patch only the
+first option does have this effect which matches the usual and expected
+semantic.
+---
+ configure.d/config_project_with_enable | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/configure.d/config_project_with_enable b/configure.d/config_project_with_enable
+index 61ba026..d7c2132 100644
+--- a/configure.d/config_project_with_enable
++++ b/configure.d/config_project_with_enable
+@@ -723,9 +723,11 @@ NETSNMP_ARG_ENABLE(local-smux,
+ fi])
+
+ NETSNMP_ARG_ENABLE(agentx-dom-sock-only,
+-[ --enable-agentx-dom-sock-only Disable UDP/TCP transports for agentx.],
+-AC_DEFINE(NETSNMP_AGENTX_DOM_SOCK_ONLY, 1,
+- [define if agentx transport is to use domain sockets only]))
++[ --enable-agentx-dom-sock-only Disable UDP/TCP transports for agentx.])
++if test "x$enable_agentx_dom_sock_only" = "xyes"; then
++ AC_DEFINE(NETSNMP_AGENTX_DOM_SOCK_ONLY, 1,
++ [define if agentx transport is to use domain sockets only])
++fi
+
+ NETSNMP_ARG_ENABLE(snmptrapd-subagent,
+ [ --disable-snmptrapd-subagent Disable agentx subagent code in snmptrapd.])
diff --git a/patches/net-snmp-5.7.3/autogen.sh b/patches/net-snmp-5.7.3/autogen.sh
new file mode 120000
index 0000000..9f8a4cb
--- /dev/null
+++ b/patches/net-snmp-5.7.3/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/net-snmp-5.7.3/series b/patches/net-snmp-5.7.3/series
new file mode 100644
index 0000000..f79fdd7
--- /dev/null
+++ b/patches/net-snmp-5.7.3/series
@@ -0,0 +1,8 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+#tag:upstream --start-number 1
+0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
+#tag:ptx --start-number 200
+0200-net-snmp-config-add-SYSROOT-support.patch
+0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
+# eda93cf4517290230962af7514bfd246 - git-ptx-patches magic
diff --git a/rules/net-snmp.make b/rules/net-snmp.make
index 0b7fbf1..37c4b81 100644
--- a/rules/net-snmp.make
+++ b/rules/net-snmp.make
@@ -18,8 +18,8 @@ PACKAGES-$(PTXCONF_NET_SNMP) += net-snmp
#
# Paths and names
#
-NET_SNMP_VERSION := 5.7.2
-NET_SNMP_MD5 := 5bddd02e2f82b62daa79f82717737a14
+NET_SNMP_VERSION := 5.7.3
+NET_SNMP_MD5 := d4a3459e1577d0efa8d96ca70a885e53
NET_SNMP := net-snmp-$(NET_SNMP_VERSION)
NET_SNMP_SUFFIX := tar.gz
NET_SNMP_URL := $(call ptx/mirror, SF, net-snmp/$(NET_SNMP).$(NET_SNMP_SUFFIX))
--
1.7.9.5
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ptxdist] [PATCH] net-snmp: version bump to 5.7.3 LTS
2015-06-25 9:11 [ptxdist] [PATCH] net-snmp: version bump to 5.7.3 LTS Oliver Graute
@ 2015-07-01 8:23 ` Michael Olbrich
2015-07-02 13:04 ` [ptxdist] Antwort: " Oliver.Graute
0 siblings, 1 reply; 3+ messages in thread
From: Michael Olbrich @ 2015-07-01 8:23 UTC (permalink / raw)
To: ptxdist
On Thu, Jun 25, 2015 at 11:11:39AM +0200, Oliver Graute wrote:
> Version bump to net-snmp version 5.7.3
>
> Signed-off-by: Oliver Graute <oliver.graute@neuhaus.de>
> ---
> ...m-fenner-fix-ICMP-mib-table-handling-on-l.patch | 148 ++++++++++++++++++++
> .../0200-net-snmp-config-add-SYSROOT-support.patch | 52 +++++++
> ...le-udp-and-tcp-when-disable-agentx-dom-so.patch | 37 +++++
I think you forgot to remove the old patches.
Michael
> patches/net-snmp-5.7.3/autogen.sh | 1 +
> patches/net-snmp-5.7.3/series | 8 ++
> rules/net-snmp.make | 4 +-
> 6 files changed, 248 insertions(+), 2 deletions(-)
> create mode 100644 patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
> create mode 100644 patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch
> create mode 100644 patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
> create mode 120000 patches/net-snmp-5.7.3/autogen.sh
> create mode 100644 patches/net-snmp-5.7.3/series
>
> diff --git a/patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch b/patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
> new file mode 100644
> index 0000000..b0b2da8
> --- /dev/null
> +++ b/patches/net-snmp-5.7.3/0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
> @@ -0,0 +1,148 @@
> +From: Wes Hardaker <hardaker@users.sourceforge.net>
> +Date: Wed, 19 Feb 2014 15:21:57 -0800
> +Subject: [PATCH] bug fix from fenner: fix ICMP mib table handling on linux
> +
> +---
> + agent/mibgroup/mibII/icmp.c | 25 +++++++++++++++++++++++--
> + agent/mibgroup/mibII/kernel_linux.c | 19 +++++++++++++------
> + agent/mibgroup/mibII/kernel_linux.h | 4 ++--
> + 3 files changed, 38 insertions(+), 10 deletions(-)
> +
> +diff --git a/agent/mibgroup/mibII/icmp.c b/agent/mibgroup/mibII/icmp.c
> +index 14c73a6..6d10426 100644
> +--- a/agent/mibgroup/mibII/icmp.c
> ++++ b/agent/mibgroup/mibII/icmp.c
> +@@ -106,10 +106,20 @@ struct icmp_msg_stats_table_entry {
> + int flags;
> + };
> +
> ++#ifdef linux
> ++/* Linux keeps track of all possible message types */
> ++#define ICMP_MSG_STATS_IPV4_COUNT 256
> ++#else
> + #define ICMP_MSG_STATS_IPV4_COUNT 11
> ++#endif
> +
> + #ifdef NETSNMP_ENABLE_IPV6
> ++#ifdef linux
> ++/* Linux keeps track of all possible message types */
> ++#define ICMP_MSG_STATS_IPV6_COUNT 256
> ++#else
> + #define ICMP_MSG_STATS_IPV6_COUNT 14
> ++#endif
> + #else
> + #define ICMP_MSG_STATS_IPV6_COUNT 0
> + #endif /* NETSNMP_ENABLE_IPV6 */
> +@@ -177,7 +187,7 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
> + inc = 0;
> + linux_read_icmp_msg_stat(&v4icmp, &v4icmpmsg, &flag);
> + if (flag) {
> +- while (254 != k) {
> ++ while (255 >= k) {
> + if (v4icmpmsg.vals[k].InType) {
> + icmp_msg_stats_table[i].ipVer = 1;
> + icmp_msg_stats_table[i].icmpMsgStatsType = k;
> +@@ -267,7 +277,7 @@ icmp_msg_stats_load(netsnmp_cache *cache, void *vmagic)
> + inc = 0;
> + linux_read_icmp6_msg_stat(&v6icmp, &v6icmpmsg, &flag);
> + if (flag) {
> +- while (254 != k) {
> ++ while (255 >= k) {
> + if (v6icmpmsg.vals[k].InType) {
> + icmp_msg_stats_table[i].ipVer = 2;
> + icmp_msg_stats_table[i].icmpMsgStatsType = k;
> +@@ -1050,6 +1060,12 @@ icmp_stats_table_handler(netsnmp_mib_handler *handler,
> + continue;
> + table_info = netsnmp_extract_table_info(request);
> + subid = table_info->colnum;
> ++ DEBUGMSGTL(( "mibII/icmpStatsTable", "oid: " ));
> ++ DEBUGMSGOID(( "mibII/icmpStatsTable", request->requestvb->name,
> ++ request->requestvb->name_length ));
> ++ DEBUGMSG(( "mibII/icmpStatsTable", " In %d InErr %d Out %d OutErr %d\n",
> ++ entry->icmpStatsInMsgs, entry->icmpStatsInErrors,
> ++ entry->icmpStatsOutMsgs, entry->icmpStatsOutErrors ));
> +
> + switch (subid) {
> + case ICMP_STAT_INMSG:
> +@@ -1117,6 +1133,11 @@ icmp_msg_stats_table_handler(netsnmp_mib_handler *handler,
> + continue;
> + table_info = netsnmp_extract_table_info(request);
> + subid = table_info->colnum;
> ++ DEBUGMSGTL(( "mibII/icmpMsgStatsTable", "oid: " ));
> ++ DEBUGMSGOID(( "mibII/icmpMsgStatsTable", request->requestvb->name,
> ++ request->requestvb->name_length ));
> ++ DEBUGMSG(( "mibII/icmpMsgStatsTable", " In %d Out %d Flags 0x%x\n",
> ++ entry->icmpMsgStatsInPkts, entry->icmpMsgStatsOutPkts, entry->flags ));
> +
> + switch (subid) {
> + case ICMP_MSG_STAT_IN_PKTS:
> +diff --git a/agent/mibgroup/mibII/kernel_linux.c b/agent/mibgroup/mibII/kernel_linux.c
> +index b21a166..ba320c7 100644
> +--- a/agent/mibgroup/mibII/kernel_linux.c
> ++++ b/agent/mibgroup/mibII/kernel_linux.c
> +@@ -81,9 +81,9 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg)
> + index = strtol(token, &delim, 0);
> + if (ERANGE == errno) {
> + continue;
> +- } else if (index > LONG_MAX) {
> ++ } else if (index > 255) {
> + continue;
> +- } else if (index < LONG_MIN) {
> ++ } else if (index < 0) {
> + continue;
> + }
> + if (NULL == (token = strtok_r(dataptr, " ", &saveptr1)))
> +@@ -94,9 +94,9 @@ decode_icmp_msg(char *line, char *data, struct icmp4_msg_mib *msg)
> + index = strtol(token, &delim, 0);
> + if (ERANGE == errno) {
> + continue;
> +- } else if (index > LONG_MAX) {
> ++ } else if (index > 255) {
> + continue;
> +- } else if (index < LONG_MIN) {
> ++ } else if (index < 0) {
> + continue;
> + }
> + if(NULL == (token = strtok_r(dataptr, " ", &saveptr1)))
> +@@ -426,14 +426,21 @@ linux_read_icmp6_parse(struct icmp6_mib *icmp6stat,
> +
> + vals = name;
> + if (NULL != icmp6msgstat) {
> ++ int type;
> + if (0 == strncmp(name, "Icmp6OutType", 12)) {
> + strsep(&vals, "e");
> +- icmp6msgstat->vals[atoi(vals)].OutType = stats;
> ++ type = atoi(vals);
> ++ if ( type < 0 || type > 255 )
> ++ continue;
> ++ icmp6msgstat->vals[type].OutType = stats;
> + *support = 1;
> + continue;
> + } else if (0 == strncmp(name, "Icmp6InType", 11)) {
> + strsep(&vals, "e");
> +- icmp6msgstat->vals[atoi(vals)].InType = stats;
> ++ type = atoi(vals);
> ++ if ( type < 0 || type > 255 )
> ++ continue;
> ++ icmp6msgstat->vals[type].InType = stats;
> + *support = 1;
> + continue;
> + }
> +diff --git a/agent/mibgroup/mibII/kernel_linux.h b/agent/mibgroup/mibII/kernel_linux.h
> +index 6bf5d47..c6dfca9 100644
> +--- a/agent/mibgroup/mibII/kernel_linux.h
> ++++ b/agent/mibgroup/mibII/kernel_linux.h
> +@@ -121,11 +121,11 @@ struct icmp_msg_mib {
> +
> + /* Lets use wrapper structures for future expansion */
> + struct icmp4_msg_mib {
> +- struct icmp_msg_mib vals[255];
> ++ struct icmp_msg_mib vals[256];
> + };
> +
> + struct icmp6_msg_mib {
> +- struct icmp_msg_mib vals[255];
> ++ struct icmp_msg_mib vals[256];
> + };
> +
> + struct udp_mib {
> diff --git a/patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch b/patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch
> new file mode 100644
> index 0000000..9c46268
> --- /dev/null
> +++ b/patches/net-snmp-5.7.3/0200-net-snmp-config-add-SYSROOT-support.patch
> @@ -0,0 +1,52 @@
> +From: Marc Kleine-Budde <mkl@pengutronix.de>
> +Date: Sun, 10 Jan 2010 00:33:45 +0100
> +Subject: [PATCH] net-snmp-config; add SYSROOT support
> +
> +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> +
> +Adapted to 5.6.1
> +
> +Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> +
> +Adapted to 5.7.2
> +
> +Signed-off-by: Alexander Dahl <post@lespocky.de>
> +---
> + net-snmp-config.in | 8 ++++----
> + 1 file changed, 4 insertions(+), 4 deletions(-)
> +
> +diff --git a/net-snmp-config.in b/net-snmp-config.in
> +index 2300fe1..361c658 100644
> +--- a/net-snmp-config.in
> ++++ b/net-snmp-config.in
> +@@ -54,7 +54,7 @@ NSC_LAGENTLIBS="@LAGENTLIBS@ @PERLLDOPTS_FOR_APPS@"
> + NSC_LMIBLIBS="@LMIBLIBS@"
> +
> + NSC_INCLUDEDIR=${includedir}
> +-NSC_LIBDIR=-L${libdir}
> ++NSC_LIBDIR=-L${SYSROOT}${libdir}
> +
> + NSC_SNMPLIBS="-lnetsnmp ${NSC_LNETSNMPLIBS}"
> + NSC_SUBAGENTLIBS="-lnetsnmpagent ${NSC_LAGENTLIBS} ${NSC_SNMPLIBS}"
> +@@ -138,10 +138,10 @@ else
> + ;;
> + #################################################### compile
> + --base-cflags)
> +- echo @CFLAGS@ @CPPFLAGS@ -I${NSC_INCLUDEDIR}
> ++ echo @CFLAGS@ @CPPFLAGS@ -I${SYSROOT}${NSC_INCLUDEDIR}
> + ;;
> + --cflags|--cf*)
> +- echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${NSC_INCLUDEDIR}
> ++ echo @CFLAGS@ @DEVFLAGS@ @CPPFLAGS@ -I. -I${SYSROOT}${NSC_INCLUDEDIR}
> + ;;
> + --srcdir)
> + echo $NSC_SRCDIR
> +@@ -598,7 +598,7 @@ EOF
> + echo "Ack. Can't create $tmpfile."
> + exit 1
> + fi
> +- cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
> ++ cmd="@CC@ $cflags @CFLAGS@ @DEVFLAGS@ -I. -I${SYSROOT}${NSC_INCLUDEDIR} -o $outname $tmpfile $cfiles $NSC_LDFLAGS $NSC_LIBDIR $NSC_BASE_AGENT_LIBS $NSC_AGENTLIBS $ldflags"
> + echo "running: $cmd"
> + `$cmd`
> + if test "x$norm" != "x1" ; then
> diff --git a/patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch b/patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
> new file mode 100644
> index 0000000..fb7be8c
> --- /dev/null
> +++ b/patches/net-snmp-5.7.3/0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
> @@ -0,0 +1,37 @@
> +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
> +Date: Tue, 3 Sep 2013 21:12:46 +0200
> +Subject: [PATCH] Don't disable udp and tcp when
> + --disable-agentx-dom-sock-only is given
> +
> +The configure magic without this patch treats all
> +
> + --enable-agentx-dom-sock-only
> + --enable-agentx-dom-sock-only=no
> + --disable-agentx-dom-sock-only
> +
> +the same; i.e. disables the udp and tcp transports. With this patch only the
> +first option does have this effect which matches the usual and expected
> +semantic.
> +---
> + configure.d/config_project_with_enable | 8 +++++---
> + 1 file changed, 5 insertions(+), 3 deletions(-)
> +
> +diff --git a/configure.d/config_project_with_enable b/configure.d/config_project_with_enable
> +index 61ba026..d7c2132 100644
> +--- a/configure.d/config_project_with_enable
> ++++ b/configure.d/config_project_with_enable
> +@@ -723,9 +723,11 @@ NETSNMP_ARG_ENABLE(local-smux,
> + fi])
> +
> + NETSNMP_ARG_ENABLE(agentx-dom-sock-only,
> +-[ --enable-agentx-dom-sock-only Disable UDP/TCP transports for agentx.],
> +-AC_DEFINE(NETSNMP_AGENTX_DOM_SOCK_ONLY, 1,
> +- [define if agentx transport is to use domain sockets only]))
> ++[ --enable-agentx-dom-sock-only Disable UDP/TCP transports for agentx.])
> ++if test "x$enable_agentx_dom_sock_only" = "xyes"; then
> ++ AC_DEFINE(NETSNMP_AGENTX_DOM_SOCK_ONLY, 1,
> ++ [define if agentx transport is to use domain sockets only])
> ++fi
> +
> + NETSNMP_ARG_ENABLE(snmptrapd-subagent,
> + [ --disable-snmptrapd-subagent Disable agentx subagent code in snmptrapd.])
> diff --git a/patches/net-snmp-5.7.3/autogen.sh b/patches/net-snmp-5.7.3/autogen.sh
> new file mode 120000
> index 0000000..9f8a4cb
> --- /dev/null
> +++ b/patches/net-snmp-5.7.3/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/net-snmp-5.7.3/series b/patches/net-snmp-5.7.3/series
> new file mode 100644
> index 0000000..f79fdd7
> --- /dev/null
> +++ b/patches/net-snmp-5.7.3/series
> @@ -0,0 +1,8 @@
> +# generated by git-ptx-patches
> +#tag:base --start-number 1
> +#tag:upstream --start-number 1
> +0001-bug-fix-from-fenner-fix-ICMP-mib-table-handling-on-l.patch
> +#tag:ptx --start-number 200
> +0200-net-snmp-config-add-SYSROOT-support.patch
> +0201-Don-t-disable-udp-and-tcp-when-disable-agentx-dom-so.patch
> +# eda93cf4517290230962af7514bfd246 - git-ptx-patches magic
> diff --git a/rules/net-snmp.make b/rules/net-snmp.make
> index 0b7fbf1..37c4b81 100644
> --- a/rules/net-snmp.make
> +++ b/rules/net-snmp.make
> @@ -18,8 +18,8 @@ PACKAGES-$(PTXCONF_NET_SNMP) += net-snmp
> #
> # Paths and names
> #
> -NET_SNMP_VERSION := 5.7.2
> -NET_SNMP_MD5 := 5bddd02e2f82b62daa79f82717737a14
> +NET_SNMP_VERSION := 5.7.3
> +NET_SNMP_MD5 := d4a3459e1577d0efa8d96ca70a885e53
> NET_SNMP := net-snmp-$(NET_SNMP_VERSION)
> NET_SNMP_SUFFIX := tar.gz
> NET_SNMP_URL := $(call ptx/mirror, SF, net-snmp/$(NET_SNMP).$(NET_SNMP_SUFFIX))
> --
> 1.7.9.5
>
>
> --
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-02 11:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-25 9:11 [ptxdist] [PATCH] net-snmp: version bump to 5.7.3 LTS Oliver Graute
2015-07-01 8:23 ` Michael Olbrich
2015-07-02 13:04 ` [ptxdist] Antwort: " Oliver.Graute
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox