diff options
author | Micael Karlberg <[email protected]> | 2011-12-01 12:20:11 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-12-01 12:20:11 +0100 |
commit | 3cf5f67f3545cc82147706cc83febc242f6e469a (patch) | |
tree | 5362ad3e0351c01e4b22273ea7aec2faef12bdc9 /lib/snmp/src/agent/snmpa_mpd.erl | |
parent | 1f6dd53f2c495d2bf28fbf519b5be636bd418ffd (diff) | |
parent | 021d5c2e49e623d4f43c0cc88a097bc99f3564e6 (diff) | |
download | otp-3cf5f67f3545cc82147706cc83febc242f6e469a.tar.gz otp-3cf5f67f3545cc82147706cc83febc242f6e469a.tar.bz2 otp-3cf5f67f3545cc82147706cc83febc242f6e469a.zip |
Merge branch 'maint-r14'
Conflicts:
lib/snmp/src/agent/snmpa_set_lib.erl
lib/snmp/src/app/snmp.appup.src
lib/snmp/src/compile/snmpc.src
lib/snmp/vsn.mk
Diffstat (limited to 'lib/snmp/src/agent/snmpa_mpd.erl')
-rw-r--r-- | lib/snmp/src/agent/snmpa_mpd.erl | 26 |
1 files changed, 18 insertions, 8 deletions
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; |