On 18/01/07, Makavy, Erez (Erez) <[EMAIL PROTECTED]> wrote:
When I define a trap manager assigned with a local-user (user which has the
engine id of the local agent, not the engine id of the management station),
I can not send out notifications with authentication (without authentication
works fine).
Known problem - fixed in 5.4 and the current CVS code for earlier branches.
Could you point me to the propper place in the code to fix it.
See the attached patch
Dave
Index: agent/agent_trap.c
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/agent/agent_trap.c,v
retrieving revision 5.28
retrieving revision 5.29
diff -u -r5.28 -r5.29
--- agent/agent_trap.c 19 May 2006 18:31:50 -0000 5.28
+++ agent/agent_trap.c 12 Sep 2006 17:33:18 -0000 5.29
@@ -1153,6 +1153,7 @@
char *argv[MAX_ARGS], *cp = cptr, tmp[SPRINT_MAX_LEN];
int argn, arg;
netsnmp_session session, *ss;
+ size_t len;
/*
* inform or trap? default to trap
@@ -1182,6 +1183,18 @@
return;
}
+ /*
+ * If this is an SNMPv3 TRAP session, then the agent is
+ * the authoritative engine, so set the engineID accordingly
+ */
+ if (ss->version == SNMP_VERSION_3 &&
+ traptype != SNMP_MSG_INFORM &&
+ ss->securityEngineIDLen == 0) {
+ len = snmpv3_get_engineID( tmp, sizeof(tmp));
+ memdup(&ss->securityEngineID, tmp, len);
+ ss->securityEngineIDLen = len;
+ }
+
#ifndef DISABLE_SNMPV1
if (ss->version == SNMP_VERSION_1) {
add_trap_session(ss, SNMP_MSG_TRAP, 0, SNMP_VERSION_1);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users