On Tue, Aug 01, 2006 at 10:00:00AM +0100, Dave Shield wrote: > On 01/08/06, Magnus Fromreide <[EMAIL PROTECTED]> wrote: > > In convert_v1pdu_to_v2: > > > > A community field is eventually inserted among the varbinds. > > That's correct. > See RFC 3584, section 3.1, step 4. > > > It is also odd that it only happens in > > convert_v1pdu_to_v2. > > Not really - this is part of "Translating SNMPv1 Notification > Parameters to SNMPv2 Notification Parameters", so that's the natural > place for this to happen. > > > > In netsnmp_send_traps: > > > > The agent address field in the v1 pdu is always overwritten, even if the v2 > > varbind that should override it is included. > > I presume you mean the snmpTrapAddress.0 varbind here?
Yes. > It's possible that this is actually correct behaviour (section 3.2, > step (2), first para), but I really need to check where > 'netsnmp_send_traps' is called. The forward code in snmptrapd bypasses it. The axforward code uses it. > If it's used when the agent is acting > as a proxy, then this should certainly use the snmpTrapAddress.0 > value. If this routine is only invoked by "locally generated" traps > (which would include AgentX notifications), then I *think* the > existing behaviour is probably fine. When it comes to the handling of AgentX notifications the RFC states (3.2 (2)): > (2) The SNMPv1 agent-addr parameter SHALL be determined based on the > situation in which the translation occurs. > > - If the translation occurs within a notification originator > application, and the notification is to be sent over IP, the > SNMPv1 agent-addr parameter SHALL be set to the IP address of > the SNMP entity in which the notification originator resides. > If the notification is to be sent over some other transport, > the SNMPv1 agent-addr parameter SHALL be set to 0.0.0.0. This one I think doesn't apply to the AgentX case as the originator application would be the subagent. > - If the translation occurs within a proxy application, the > proxy must attempt to extract the original source of the > notification from the variable-bindings. If the SNMPv2 > variable-bindings contains a variable binding whose name is > snmpTrapAddress.0, the agent-addr parameter SHALL be set to > the value of that variable binding. Otherwise, the SNMPv1 > agent-addr parameter SHALL be set to 0.0.0.0. This I think would be the case for AgentX, and then the ordering should be something like: 1) Use snmpTrapAddress.0 2) Use 0.0.0.0 but I agree that it is reasonable to interpret the SHALL above to mean 1) Use snmpTrapAddress.0 2) Use other means (e.g. use local address if connected via local transport) 3) Use 0.0.0.0 and this also have the added benefits that 'axforward' in snmptrapd can be made to work more transperent. > But I need to check this more carefully. Thank you. > Dave ------------------------------------------------------------------------- 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-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
