summaryrefslogtreecommitdiff
path: root/ext/snmp
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2006-07-26 23:57:43 +0000
committerfoobar <sniper@php.net>2006-07-26 23:57:43 +0000
commit67a82e5106ec1602e3c30be094554965e9b1fcad (patch)
tree3a28280dd5cb932f9bd5a276442dc800686df1ea /ext/snmp
parenta7768dd36f1c35955ca1ef31cd5c2248558283f8 (diff)
downloadphp-git-67a82e5106ec1602e3c30be094554965e9b1fcad.tar.gz
MFH: - Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2 compatibility issue)
Diffstat (limited to 'ext/snmp')
-rw-r--r--ext/snmp/snmp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index 4964890722..e0568cec18 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -834,10 +834,14 @@ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot T
*
* As we want this extension to compile on both versions, we use the latter
* symbol on purpose, as it's defined to be the same as the former.
+*
+* However, in 5.2 the type of usmAES128PrivProtocol is a pointer, not an
+* array, so we cannot use the OIDSIZE macro because it uses sizeof().
+*
*/
|| !strcasecmp(prot, "AES")) {
s->securityPrivProto = usmAES128PrivProtocol;
- s->securityPrivProtoLen = OIDSIZE(usmAES128PrivProtocol);
+ s->securityPrivProtoLen = USM_PRIV_PROTO_AES128_LEN;
return (0);
#else
) {