diff options
-rw-r--r-- | patches/net-snmp-5.6.1/0002-really-disable-dom-sock-only.patch | 36 | ||||
l--------- | patches/net-snmp-5.6.1/autogen.sh | 1 | ||||
-rw-r--r-- | patches/net-snmp-5.6.1/series | 1 | ||||
-rw-r--r-- | rules/net-snmp.in | 5 | ||||
-rw-r--r-- | rules/net-snmp.make | 2 |
5 files changed, 44 insertions, 1 deletions
diff --git a/patches/net-snmp-5.6.1/0002-really-disable-dom-sock-only.patch b/patches/net-snmp-5.6.1/0002-really-disable-dom-sock-only.patch new file mode 100644 index 000000000..000c05d78 --- /dev/null +++ b/patches/net-snmp-5.6.1/0002-really-disable-dom-sock-only.patch @@ -0,0 +1,36 @@ +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 069cc07..6ad3af8 100644 +--- a/configure.d/config_project_with_enable ++++ b/configure.d/config_project_with_enable +@@ -692,9 +692,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.6.1/autogen.sh b/patches/net-snmp-5.6.1/autogen.sh new file mode 120000 index 000000000..9f8a4cb7d --- /dev/null +++ b/patches/net-snmp-5.6.1/autogen.sh @@ -0,0 +1 @@ +../autogen.sh
\ No newline at end of file diff --git a/patches/net-snmp-5.6.1/series b/patches/net-snmp-5.6.1/series index 89093b4f3..326b72ff0 100644 --- a/patches/net-snmp-5.6.1/series +++ b/patches/net-snmp-5.6.1/series @@ -1 +1,2 @@ 0001-net-snmp-config-add-SYSROOT-support.patch -p0 +0002-really-disable-dom-sock-only.patch diff --git a/rules/net-snmp.in b/rules/net-snmp.in index 6205a1946..1ddc293a7 100644 --- a/rules/net-snmp.in +++ b/rules/net-snmp.in @@ -118,4 +118,9 @@ config NET_SNMP_MIB_INSTALL_DIR string default "/usr/share/snmp/mibs" +config NET_SNMP_DOM_SOCK_ONLY + bool "Only allow domain socket connections to the agent" if NET_SNMP_AGENT + default y + help + Enable this to disable TCP and UDP connections to the agent. endif diff --git a/rules/net-snmp.make b/rules/net-snmp.make index 6cb095204..f7c026261 100644 --- a/rules/net-snmp.make +++ b/rules/net-snmp.make @@ -53,7 +53,7 @@ NET_SNMP_AUTOCONF := \ --disable-static \ --disable-privacy \ --disable-internal-md5 \ - --disable-agentx-dom-sock-only \ + --$(call ptx/endis, PTXCONF_NET_SNMP_DOM_SOCK_ONLY)-agentx-dom-sock-only \ --disable-mib-config-checking \ --disable-mfd-rewrites \ --disable-testing-code \ |