From 35bf5000438b34a43752f668930bc5347f4643a9 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 26 Jan 2012 17:18:36 +0100 Subject: [snmp/agent] Wrong OID used for error message reply When sending an error message (reply) regarding snmpUnknownPDUHandlers, the agent used the wrong OID. OTP-9747 --- lib/snmp/src/agent/snmpa_mpd.erl | 28 +++++++++++++++++++--------- lib/snmp/src/app/snmp.appup.src | 16 ++++++++++++++++ lib/snmp/vsn.mk | 6 ++++-- 3 files changed, 39 insertions(+), 11 deletions(-) (limited to 'lib/snmp') diff --git a/lib/snmp/src/agent/snmpa_mpd.erl b/lib/snmp/src/agent/snmpa_mpd.erl index fd75b98f84..e9d6cdeaa8 100644 --- a/lib/snmp/src/agent/snmpa_mpd.erl +++ b/lib/snmp/src/agent/snmpa_mpd.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2010. All Rights Reserved. +%% Copyright Ericsson AB 1997-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -463,15 +463,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, @@ -502,6 +497,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 4ac6daf579..38a396aaa0 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -22,9 +22,15 @@ %% ----- U p g r a d e ------------------------------------------------------- [ + {"4.17.3", + [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []} + ] + }, {"4.17.2", [ {load_module, snmpa, soft_purge, soft_purge, []}, + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]}, {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, @@ -36,6 +42,7 @@ {"4.17.1", [ {load_module, snmpa, soft_purge, soft_purge, []}, + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]}, {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, @@ -49,6 +56,7 @@ {"4.17", [ {load_module, snmpa, soft_purge, soft_purge, []}, + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]}, {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, @@ -135,9 +143,15 @@ %% ------D o w n g r a d e --------------------------------------------------- [ + {"4.17.3", + [ + {load_module, snmpa_mpd, soft_purge, soft_purge, []} + ] + }, {"4.17.2", [ {load_module, snmpa, soft_purge, soft_purge, []}, + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]}, {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, @@ -149,6 +163,7 @@ {"4.17.1", [ {load_module, snmpa, soft_purge, soft_purge, []}, + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]}, {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, @@ -162,6 +177,7 @@ {"4.17", [ {load_module, snmpa, soft_purge, soft_purge, []}, + {load_module, snmpa_mpd, soft_purge, soft_purge, []}, {load_module, snmp_target_mib, soft_purge, soft_purge, [snmpa_mib_lib]}, {load_module, snmpa_mib_lib, soft_purge, soft_purge, []}, {load_module, snmpa_trap, soft_purge, soft_purge, []}, diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 3ab08eca58..5ab0553789 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -17,11 +17,13 @@ # # %CopyrightEnd% -SNMP_VSN = 4.17.3 +SNMP_VSN = 4.17.4 PRE_VSN = APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)" -TICKETS = OTP-9700 OTP-9868 +TICKETS = OTP-9747 + +TICKETS_4_17_3 = OTP-9700 OTP-9868 TICKETS_4_17_2 = OTP-9236 -- cgit v1.2.3 From 36196c2b7684d07c15220bc5794ddfb487ddfc34 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 26 Jan 2012 17:40:23 +0100 Subject: [snmp/agent] Add proper release notes OTP-9884 --- lib/snmp/doc/src/notes.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'lib/snmp') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 9082868e39..7cff3fd257 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,6 +32,60 @@ notes.xml +
+ SNMP Development Toolkit 4.17.4 + +

Version 4.17.4 supports code replacement in runtime from/to + version 4.17.3, 4.17.2, 4.17.1, 4.17, 4.16.2, 4.16.1 and 4.16.

+ +
+ Improvements and new features +

-

+ + + +
+ +
+ Reported Fixed Bugs and Malfunctions + + + + +

[agent] When sending an error message (reply) regarding + snmpUnknownPDUHandlers, the agent used the wrong OID.

+

Own Id: OTP-9747

+
+ +
+ +
+ +
+ Incompatibilities +

-

+
+ +
+ +
SNMP Development Toolkit 4.17.3 -- cgit v1.2.3