summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2019-02-26 15:45:51 +0800
committerKhem Raj <raj.khem@gmail.com>2019-02-26 17:37:33 -0800
commit875cc55028c7ea511763d46f5586c61eee53e42e (patch)
tree3ac9f2a91ea6250fa8c040f8ac9d93039c8edc01 /meta-networking/recipes-protocols
parent67f5877b50de039ed0f63b6868edfda776162326 (diff)
downloadmeta-openembedded-875cc55028c7ea511763d46f5586c61eee53e42e.tar.gz
net-snmp: fix compile error with --disable-des
| scapi.c: In function 'sc_encrypt': | scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'? | pad_size = pai->pad_size; | ^~~~~~~~ | dysize pad_size is defined only without --disable-des [snip] int pad, plast, pad_size = 0; but used when disable-des [snip] QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); } pad_size = pai->pad_size; memset(my_iv, 0, sizeof(my_iv)); if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) { /* fix by move it into #ifndef NETSNMP_DISABLE_DES Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch62
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb1
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch
new file mode 100644
index 000000000..7e686ce7f
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch
@@ -0,0 +1,62 @@
1From e38c508ef401593b1d4fe42b62e42a49cfec82af Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Tue, 26 Feb 2019 14:26:07 +0800
4Subject: [PATCH] net-snmp: fix compile error with --disable-des
5
6| scapi.c: In function 'sc_encrypt':
7| scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'?
8| pad_size = pai->pad_size;
9| ^~~~~~~~
10| dysize
11
12pad_size is defined only without --disable-des
13[snip]
14#ifndef NETSNMP_DISABLE_DES
15 int pad, plast, pad_size = 0;
16
17but used when disable-des,
18[snip]
19 QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
20 }
21 pad_size = pai->pad_size;
22
23 memset(my_iv, 0, sizeof(my_iv));
24
25#ifndef NETSNMP_DISABLE_DES
26 if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) {
27
28 /*
29
30fix by move it into #ifndef NETSNMP_DISABLE_DES
31
32Upstream-Status: Submitted [https://sourceforge.net/p/net-snmp/bugs/2927/]
33
34Signed-off-by: Changqing Li <changqing.li@windriver.com>
35---
36 snmplib/scapi.c | 3 ++-
37 1 file changed, 2 insertions(+), 1 deletion(-)
38
39diff --git a/snmplib/scapi.c b/snmplib/scapi.c
40index 43caddf..c09deb0 100644
41--- a/snmplib/scapi.c
42+++ b/snmplib/scapi.c
43@@ -1253,7 +1253,6 @@ sc_encrypt(const oid * privtype, size_t privtypelen,
44
45 QUITFUN(SNMPERR_GENERR, sc_encrypt_quit);
46 }
47- pad_size = pai->pad_size;
48
49 memset(my_iv, 0, sizeof(my_iv));
50
51@@ -1263,6 +1262,8 @@ sc_encrypt(const oid * privtype, size_t privtypelen,
52 /*
53 * now calculate the padding needed
54 */
55+
56+ pad_size = pai->pad_size;
57 pad = pad_size - (ptlen % pad_size);
58 plast = (int) ptlen - (pad_size - pad);
59 if (pad == pad_size)
60--
612.7.4
62
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
index e1c780b4d..1e87fd0af 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.8.bb
@@ -26,6 +26,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.zip \
26 file://net-snmp-fix-for-disable-des.patch \ 26 file://net-snmp-fix-for-disable-des.patch \
27 file://reproducibility-have-printcap.patch \ 27 file://reproducibility-have-printcap.patch \
28 file://reproducibility-accept-configure-options-from-env.patch \ 28 file://reproducibility-accept-configure-options-from-env.patch \
29 file://0001-net-snmp-fix-compile-error-disable-des.patch \
29 " 30 "
30SRC_URI[md5sum] = "6aae5948df7efde626613d6a4b3cd9d4" 31SRC_URI[md5sum] = "6aae5948df7efde626613d6a4b3cd9d4"
31SRC_URI[sha256sum] = "c6291385b8ed84f05890fe4197005daf7e7ee7b082c2e390fa114a9477a56042" 32SRC_URI[sha256sum] = "c6291385b8ed84f05890fe4197005daf7e7ee7b082c2e390fa114a9477a56042"