Largely brought about by the discussion with Claus, he definitely did
spot one problem. In addition, I'd like to apply the debugging cleanup
patch as well. Although I don't think it should be a problem based on
the code I've looked at, he believes he's hit a null deference and it
wouldn't surprise me. This is cleaner and clearer so I'm fine with
applying it for 5.6.1.
He has a number of other test cases in his messages and you're welcome
to read them, but for me they're too complex to consider adding for
5.6.1 at this point which is nearing release-candidate phase. I'm not
confident about the other aspects of the patches he wanted to apply.
diff --git a/net-snmp/agent/agent_trap.c b/net-snmp/agent/agent_trap.c
index 76f5ebc..99c0904 100644
--- a/net-snmp/agent/agent_trap.c
+++ b/net-snmp/agent/agent_trap.c
@@ -930,7 +930,7 @@ send_trap_to_sess(netsnmp_session * sess, netsnmp_pdu
*template_pdu)
len = snmpv3_get_engineID(tmp, sizeof(tmp));
memdup(&pdu->securityEngineID, tmp, len);
- sess->securityEngineIDLen = len;
+ pdu->securityEngineIDLen = len;
}
result = snmp_send(sess, pdu);
Modified
net-snmp/agent/mibgroup/etherlike-mib/data_access/dot3stats_linux.c
Modified net-snmp/snmplib/snmpusm.c
diff --git a/net-snmp/snmplib/snmpusm.c b/net-snmp/snmplib/snmpusm.c
index f3dff07..437d192 100644
--- a/net-snmp/snmplib/snmpusm.c
+++ b/net-snmp/snmplib/snmpusm.c
@@ -3127,7 +3127,11 @@ usm_get_user_from_list(u_char * engineID, size_t
engineIDLen,
memcmp(ptr->engineID, engineID, engineIDLen) == 0)))
return ptr;
DEBUGMSGTL(("usm", "no match on engineID ("));
- DEBUGMSGHEX(("usm", engineID, engineIDLen));
+ if (engineID) {
+ DEBUGMSGHEX(("usm", engineID, engineIDLen));
+ } else {
+ DEBUGMSGTL(("usm", "Empty EngineID"));
+ }
DEBUGMSG(("usm", ")\n"));
}
}
--
Wes Hardaker
Please mail all replies to [email protected]
------------------------------------------------------------------------------
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders