summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2015-07-28 15:55:11 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2015-08-06 15:44:10 -0400
commit96b36e69759740ae9e902d71c3ac0bc93c89ba38 (patch)
treed498651b42eb14dc1f675001f6024b9afa4c75e0
parenteee640df1a0dc28ec68c842fdaecc41ec69c087f (diff)
downloadmeta-openembedded-96b36e69759740ae9e902d71c3ac0bc93c89ba38.tar.gz
net-snmp: fix mib representation of timeout values
Fix mib representation of timeout values,correct conversion factor from microseconds to centiseconds. Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-mib-timeout-values.patch56
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb1
2 files changed, 57 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-mib-timeout-values.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-mib-timeout-values.patch
new file mode 100644
index 000000000..324d1c05c
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/net-snmp-5.7.2-fix-mib-timeout-values.patch
@@ -0,0 +1,56 @@
1net-snmp: fix mib representation of timeout values
2
3The patch comes from the follow three commits on upstream:
478dac6e37943d1ad99841898806ea60b0eede636
5390303059fbd98b1ee7621ddd4ad4c11d100fff9
696302af7fc3108c208227432f0f0b75f3e7b906d
7
8The first commit:
9Fix bug number #a2478: fix mib representation of timeout values.
10The second commit:
11Reverts 78dac6e37943d1ad99841898806ea60b0eede636 and resolve a2478
12in a way that avoids truncating
13The third commit:
14Corrects conversion factor from microseconds to centiseconds.
15
16Upstream-Status: Backport
17
18Signed-off-by: Per Hallsmark <per.hallsmark@windriver.com>
19Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
20
21diff -uarN net-snmp-5.7.2-org/agent/mibgroup/notification/snmpNotifyTable.c net-snmp-5.7.2/agent/mibgroup/notification/snmpNotifyTable.c
22--- net-snmp-5.7.2-org/agent/mibgroup/notification/snmpNotifyTable.c 2015-04-09 15:24:18.393570318 +0800
23+++ net-snmp-5.7.2/agent/mibgroup/notification/snmpNotifyTable.c 2015-04-09 15:25:23.547569858 +0800
24@@ -331,7 +331,7 @@
25 ptr->tAddressLen = t->remote_length;
26 ptr->tAddress = t->remote;
27
28- ptr->timeout = ss->timeout / 1000;
29+ ptr->timeout = ss->timeout / 10000;
30 ptr->retryCount = ss->retries;
31 SNMP_FREE(ptr->tagList);
32 ptr->tagList = strdup(ptr->name);
33diff -uarN net-snmp-5.7.2-org/agent/mibgroup/target/snmpTargetAddrEntry.h net-snmp-5.7.2/agent/mibgroup/target/snmpTargetAddrEntry.h
34--- net-snmp-5.7.2-org/agent/mibgroup/target/snmpTargetAddrEntry.h 2015-04-09 15:24:18.593570085 +0800
35+++ net-snmp-5.7.2/agent/mibgroup/target/snmpTargetAddrEntry.h 2015-04-09 15:26:41.250570178 +0800
36@@ -51,7 +51,7 @@
37 int tDomainLen;
38 unsigned char *tAddress;
39 size_t tAddressLen;
40- int timeout;
41+ int timeout; /* Timeout in centiseconds */
42 int retryCount;
43 char *tagList;
44 char *params;
45diff -uarN net-snmp-5.7.2-org/agent/mibgroup/target/target.c net-snmp-5.7.2/agent/mibgroup/target/target.c
46--- net-snmp-5.7.2-org/agent/mibgroup/target/target.c 2015-04-09 15:24:18.592569768 +0800
47+++ net-snmp-5.7.2/agent/mibgroup/target/target.c 2015-04-09 15:25:52.586569961 +0800
48@@ -240,7 +240,7 @@
49 }
50 #endif
51 memset(&thissess, 0, sizeof(thissess));
52- thissess.timeout = (targaddrs->timeout) * 1000;
53+ thissess.timeout = (targaddrs->timeout) * 10000;
54 thissess.retries = targaddrs->retryCount;
55 DEBUGMSGTL(("target_sessions",
56 "timeout: %d -> %ld\n",
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
index 2d9d9740f..464473e2a 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.7.2.1.bb
@@ -22,6 +22,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
22 file://run-ptest \ 22 file://run-ptest \
23 file://0001-Fix-CVE-2014-2285.patch \ 23 file://0001-Fix-CVE-2014-2285.patch \
24 file://dont-return-incompletely-parsed-varbinds.patch \ 24 file://dont-return-incompletely-parsed-varbinds.patch \
25 file://net-snmp-5.7.2-fix-mib-timeout-values.patch \
25" 26"
26 27
27SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18" 28SRC_URI[md5sum] = "a2c83518648b0f2a5d378625e45c0e18"