[erlang-questions] Process dictionary bug in SNMP agent, when changing own passphrase?

Martin Bjorklund <>
Thu Apr 19 08:47:06 CEST 2007


Scott Lystig Fritchie <> wrote:
> Greetings, I think I've found another bug in passphrase handling in
> the OTP SNMP agent.  I don't have a good suggestion for a fix yet, but
> perhaps this is a simple one?

[...]

> I think the bug lies in the snmp_master_agent process using its local
> process dictionary to store info about the query.  snmp_acm:init_ca/2
> has the put(), and snmp_user_based_sm_mib:validate_requester/3 has the
> get(),

Yes, this seems to be the bug.  I think the fix is fairly simple.  In
snmpa_agent:handle_info({snmp_pdu, ...}), the call to
AuthModule:init_check_access() (and cheat/1) should be moved into
handle_pdu().  handle_pdu() is called in the right process.  You just
have to make sure that the error cases (handle_acm_error and
discarded) are handled correctly.

But this is something I assume Micael Karlberg at OTP gladly fixes :)

We don't use multi_threading in the agent either.



/martin



More information about the erlang-questions mailing list