diff options
author | Micael Karlberg <[email protected]> | 2011-11-25 20:04:00 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-11-25 20:04:00 +0100 |
commit | 1655bd7f6c68b9b8788f69dca1b1f67a05a0745e (patch) | |
tree | deb7a08d1d77a7df71a3803724fe87c0104a1734 /lib | |
parent | 4062174a7e1f5aa06fd7e125250a125d4cf1f73e (diff) | |
parent | 337b7e74ea4c338e08ef9c86056c49c6e2203877 (diff) | |
download | otp-1655bd7f6c68b9b8788f69dca1b1f67a05a0745e.tar.gz otp-1655bd7f6c68b9b8788f69dca1b1f67a05a0745e.tar.bz2 otp-1655bd7f6c68b9b8788f69dca1b1f67a05a0745e.zip |
Merge branch 'bmk/snmp/agent/wrong_oid_for_snmpUnknownPDUHandlers/OTP-9747' into bmk/snmp/snmp4213_integration
Diffstat (limited to 'lib')
-rw-r--r-- | lib/snmp/doc/src/notes.xml | 6 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_mpd.erl | 26 | ||||
-rw-r--r-- | lib/snmp/src/app/snmp.appup.src | 6 |
3 files changed, 30 insertions, 8 deletions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 6699387dea..b47007202e 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -69,6 +69,12 @@ <p>Own Id: OTP-9745</p> </item> + <item> + <p>[agent] When sending an error message (reply) regarding + <c>snmpUnknownPDUHandlers</c>, the agent used the wrong OID. </p> + <p>Own Id: OTP-9747</p> + </item> + </list> </section> diff --git a/lib/snmp/src/agent/snmpa_mpd.erl b/lib/snmp/src/agent/snmpa_mpd.erl index 4f50b1a674..0305e1fbec 100644 --- a/lib/snmp/src/agent/snmpa_mpd.erl +++ b/lib/snmp/src/agent/snmpa_mpd.erl @@ -468,15 +468,10 @@ v3_proc(NoteStore, Packet, LocalEngineID, V3Hdr, Data, Log) -> _ -> %% 4.2.2.1.2 NIsReportable = snmp_misc:is_reportable_pdu(Type), - Val = inc(snmpUnknownPDUHandlers), ErrorInfo = - {#varbind{oid = ?snmpUnknownPDUHandlers, - variabletype = 'Counter32', - value = Val}, - SecName, - [{securityLevel, SecLevel}, - {contextEngineID, ContextEngineID}, - {contextName, ContextName}]}, + snmpUnknownPDUHandlers_ei(SecName, SecLevel, + ContextEngineID, + ContextName), case generate_v3_report_msg(MsgID, MsgSecurityModel, Data, LocalEngineID, @@ -507,6 +502,21 @@ v3_proc(NoteStore, Packet, LocalEngineID, V3Hdr, Data, Log) -> end end. +make_error_info(Variable, Oid, SecName, Opts) -> + Val = inc(Variable), + VB = #varbind{oid = Oid, + variabletype = 'Counter32', + value = Val}, + {VB, SecName, Opts}. + +snmpUnknownPDUHandlers_ei(SecName, SecLevel, + ContextEngineID, ContextName) -> + Opts = [{securityLevel, SecLevel}, + {contextEngineID, ContextEngineID}, + {contextName, ContextName}], + make_error_info(snmpUnknownPDUHandlers, + ?snmpUnknownPDUHandlers_instance, + SecName, Opts). get_security_module(?SEC_USM) -> snmpa_usm; diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index c3075c2732..d84c9e9272 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -24,6 +24,7 @@ [ {"4.21.2", [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, []} @@ -31,6 +32,7 @@ }, {"4.21.1", [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, []}, @@ -39,6 +41,7 @@ }, {"4.21", [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, []}, @@ -144,6 +147,7 @@ [ {"4.21.2", [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, []} @@ -151,6 +155,7 @@ }, {"4.21.1", [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, {update, snmpa_agent, soft, soft_purge, soft_purge, []}, @@ -159,6 +164,7 @@ }, {"4.21", [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmpa_set_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, []}, |