All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] net-snmp: fix AgentX crash and initscripts packages
@ 2016-07-07  2:18 jackie.huang
  2016-07-07  2:18 ` [PATCH 1/2] net-snmp: fix snmpd crash via AgentX connection jackie.huang
  2016-07-07  2:18 ` [PATCH 2/2] net-snmp: initscripts are located in net-snmp-server-snmp package jackie.huang
  0 siblings, 2 replies; 3+ messages in thread
From: jackie.huang @ 2016-07-07  2:18 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

The following changes since commit 1cb7275961fd4bca3a6cb70e064ad6e6e1ff04d6:

  gnome-terminal, toscoterm, vala-terminal, xfce4-terminal: use vte9 (2016-06-23 15:21:27 +0200)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib.git jhuang0/fp_net-snmp_160707_0
  http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/fp_net-snmp_160707_0

Jackie Huang (1):
  net-snmp: fix snmpd crash via AgentX connection

Li Wang (1):
  net-snmp: initscripts are located in net-snmp-server-snmp package

 .../net-snmp/net-snmp/net-snmp-agentx-crash.patch  | 75 ++++++++++++++++++++++
 .../recipes-protocols/net-snmp/net-snmp_5.7.3.bb   |  7 +-
 2 files changed, 79 insertions(+), 3 deletions(-)
 create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-agentx-crash.patch

-- 
2.8.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] net-snmp: fix snmpd crash via AgentX connection
  2016-07-07  2:18 [PATCH 0/2] net-snmp: fix AgentX crash and initscripts packages jackie.huang
@ 2016-07-07  2:18 ` jackie.huang
  2016-07-07  2:18 ` [PATCH 2/2] net-snmp: initscripts are located in net-snmp-server-snmp package jackie.huang
  1 sibling, 0 replies; 3+ messages in thread
From: jackie.huang @ 2016-07-07  2:18 UTC (permalink / raw)
  To: openembedded-devel

From: Jackie Huang <jackie.huang@windriver.com>

backport a patch to fixed snmpd crashing when an AgentX
subagent disconnect in the middle of processing of a request.

Signed-off-by: Zhu Yanjun <yanjun.zhu@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 .../net-snmp/net-snmp/net-snmp-agentx-crash.patch  | 75 ++++++++++++++++++++++
 .../recipes-protocols/net-snmp/net-snmp_5.7.3.bb   |  1 +
 2 files changed, 76 insertions(+)
 create mode 100644 meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-agentx-crash.patch

diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-agentx-crash.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-agentx-crash.patch
new file mode 100644
index 0000000..5eed893
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-agentx-crash.patch
@@ -0,0 +1,75 @@
+Description: fix snmpd crash via AgentX connection
+
+ taken from Fedora, net-snmp-5.7-agentx-crash.patch
+
+bz729738 - net-snmp dumps core in netsnmp_oid_find_prefix
+bz1038011 - net-snmp: snmpd crashes/hangs when AgentX subagent times-out
+
+commit f9304c83f76202db0e684269ca1af32e43cd9db4
+Author: Jan Safranek <jsafranek@users.sourceforge.net>
+Date:   Tue Feb 7 14:53:44 2012 +0100
+
+    CHANGES: PATCH 1633670: fixed snmpd crashing when an AgentX subagent
+    disconnect in the middle of processing of a request.
+
+    I fixed also the memory leak reported in the tracker comments.
+
+Upstream-Status: Backport
+
+Signed-off-by: Zhu Yanjun <yanjun.zhu@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+
+---
+ agent/mibgroup/agentx/master.c       | 5 +++++
+ agent/mibgroup/agentx/master_admin.c | 9 +++++++--
+ 2 files changed, 12 insertions(+), 2 deletions(-)
+
+diff --git a/agent/mibgroup/agentx/master.c b/agent/mibgroup/agentx/master.c
+index c42a42a..baeebaf 100644
+--- a/agent/mibgroup/agentx/master.c
++++ b/agent/mibgroup/agentx/master.c
+@@ -219,6 +219,9 @@ agentx_got_response(int operation,
+     if (!cache) {
+         DEBUGMSGTL(("agentx/master", "response too late on session %8p\n",
+                     session));
++        /* response is too late, free the cache */
++        if (magic)
++            netsnmp_free_delegated_cache((netsnmp_delegated_cache*) magic);
+         return 0;
+     }
+     requests = cache->requests;
+@@ -606,6 +609,8 @@ agentx_master_handler(netsnmp_mib_handler *handler,
+     result = snmp_async_send(ax_session, pdu, agentx_got_response, cb_data);
+     if (result == 0) {
+         snmp_free_pdu(pdu);
++        if (cb_data)
++            netsnmp_free_delegated_cache((netsnmp_delegated_cache*) cb_data);
+     }
+ 
+     return SNMP_ERR_NOERROR;
+diff --git a/agent/mibgroup/agentx/master_admin.c b/agent/mibgroup/agentx/master_admin.c
+index f16f392..b84b85e 100644
+--- a/agent/mibgroup/agentx/master_admin.c
++++ b/agent/mibgroup/agentx/master_admin.c
+@@ -133,11 +133,16 @@ close_agentx_session(netsnmp_session * session, int sessid)
+          * requests, so that the delegated request will be completed and
+          * further requests can be processed
+          */
+-        netsnmp_remove_delegated_requests_for_session(session);
++	while (netsnmp_remove_delegated_requests_for_session(session)) {
++		DEBUGMSGTL(("agentx/master", "Continue removing delegated reqests\n"));
++	}
++
+         if (session->subsession != NULL) {
+             netsnmp_session *subsession = session->subsession;
+             for(; subsession; subsession = subsession->next) {
+-                netsnmp_remove_delegated_requests_for_session(subsession);
++                while (netsnmp_remove_delegated_requests_for_session(subsession)) {
++			DEBUGMSGTL(("agentx/master", "Continue removing delegated subsession reqests\n"));
++		}
+             }
+         }
+                 
+-- 
+2.7.4
+
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
index 79892a1..ca98fc0 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
@@ -22,6 +22,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
         file://0001-config_os_headers-Error-Fix.patch \
         file://0001-config_os_libs2-Error-Fix.patch \
         file://0001-snmplib-keytools.c-Don-t-check-for-return-from-EVP_M.patch \
+        file://net-snmp-agentx-crash.patch \
 "
 SRC_URI[md5sum] = "9f682bd70c717efdd9f15b686d07baee"
 SRC_URI[sha256sum] = "e8dfc79b6539b71a6ff335746ce63d2da2239062ad41872fff4354cafed07a3e"
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] net-snmp: initscripts are located in net-snmp-server-snmp package
  2016-07-07  2:18 [PATCH 0/2] net-snmp: fix AgentX crash and initscripts packages jackie.huang
  2016-07-07  2:18 ` [PATCH 1/2] net-snmp: fix snmpd crash via AgentX connection jackie.huang
@ 2016-07-07  2:18 ` jackie.huang
  1 sibling, 0 replies; 3+ messages in thread
From: jackie.huang @ 2016-07-07  2:18 UTC (permalink / raw)
  To: openembedded-devel

From: Li Wang <li.wang@windriver.com>

The net-snmp-server package is a meta-package requiring
net-snmp-server-snmpd and net-snmp-server-snmptrapd package.
The net-snmp-server-snmpd package provides the startup scripts
not the meta net-snmp-server package.

Signed-off-by: Anders Wallin <anders.wallin@windriver.com>
Signed-off-by: Li Wang <li.wang@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
index ca98fc0..4ad5b21 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.3.bb
@@ -143,9 +143,9 @@ FILES_${PN}-dev += "${bindir}/mib2c ${bindir}/mib2c-update"
 CONFFILES_${PN}-server-snmpd = "${sysconfdir}/snmp/snmpd.conf"
 CONFFILES_${PN}-server-snmptrapd = "${sysconfdir}/snmp/snmptrapd.conf"
 
-INITSCRIPT_PACKAGES = "${PN}-server"
-INITSCRIPT_NAME_${PN}-server = "snmpd"
-INITSCRIPT_PARAMS_${PN}-server = "start 90 2 3 4 5 . stop 60 0 1 6 ."
+INITSCRIPT_PACKAGES = "${PN}-server-snmpd"
+INITSCRIPT_NAME_${PN}-server-snmpd = "snmpd"
+INITSCRIPT_PARAMS_${PN}-server-snmpd = "start 90 2 3 4 5 . stop 60 0 1 6 ."
 
 EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemd', '--without-systemd', d)}"
 
-- 
2.8.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-07  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-07  2:18 [PATCH 0/2] net-snmp: fix AgentX crash and initscripts packages jackie.huang
2016-07-07  2:18 ` [PATCH 1/2] net-snmp: fix snmpd crash via AgentX connection jackie.huang
2016-07-07  2:18 ` [PATCH 2/2] net-snmp: initscripts are located in net-snmp-server-snmp package jackie.huang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.