Skip to content

Commit 87182b1

Browse files
author
foobar
committed
- Fixed bug #37564 (AES privacy encryption not possible due to net-snmp 5.2 compatibility issue)
1 parent 0e5b2b1 commit 87182b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/snmp/snmp.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,14 @@ static int netsnmp_session_set_sec_protocol(struct snmp_session *s, char *prot T
834834
*
835835
* As we want this extension to compile on both versions, we use the latter
836836
* symbol on purpose, as it's defined to be the same as the former.
837+
*
838+
* However, in 5.2 the type of usmAES128PrivProtocol is a pointer, not an
839+
* array, so we cannot use the OIDSIZE macro because it uses sizeof().
840+
*
837841
*/
838842
|| !strcasecmp(prot, "AES")) {
839843
s->securityPrivProto = usmAES128PrivProtocol;
840-
s->securityPrivProtoLen = OIDSIZE(usmAES128PrivProtocol);
844+
s->securityPrivProtoLen = USM_PRIV_PROTO_AES128_LEN;
841845
return (0);
842846
#else
843847
) {

0 commit comments

Comments
 (0)