From aa7bbf1ec743389c1b3a461fa40a858800ae5049 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 7 Dec 2010 13:46:13 +0100 Subject: [agent] When calling snmp_view_based_acm_mib:reconfigure/1 on a running node, the vacmAccessTable whas not properly cleaned. This means that if some entries in the vacm.conf file was removed compared to the "current" config), while others where modified and/or added, the removed entrie(s) would still exist in the vacmAccessTable. --- lib/snmp/doc/src/notes.xml | 45 +++++++++++++--- lib/snmp/doc/src/snmp_view_based_acm_mib.xml | 74 +++++++++++++++----------- lib/snmp/doc/src/snmpa_error.xml | 7 ++- lib/snmp/src/agent/snmp_view_based_acm_mib.erl | 2 + lib/snmp/src/agent/snmpa_vacm.erl | 8 ++- lib/snmp/src/app/snmp.appup.src | 12 +++++ lib/snmp/vsn.mk | 21 +++++++- 7 files changed, 128 insertions(+), 41 deletions(-) (limited to 'lib') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 493e7aa092..cb41ca8e3a 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -32,23 +32,54 @@ notes.xml +
+ SNMP Development Toolkit 4.18.1 +

Version 4.18.1 supports code replacement in runtime from/to + version 4.18, 4.17.1 and 4.17.

+ +
+ Improvements and new features +

-

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

[agent] When calling + snmp_view_based_acm_mib:reconfigure/1 + on a running node, the table vacmAccessTable was not properly + cleaned. + This means that if some entries in the vacm.conf file was removed + (compared to the current config), + while others where modified and/or added, the removed entrie(s), + would still exist in the vacmAccessTable.

+

Own Id: OTP-8981

+

Aux Id: Seq 11750

+
+
+
+ +
+ Incompatibilities +

-

+
+
+ +
SNMP 4.18
Fixed Bugs and Malfunctions -

- When the function FilterMod:accept_recv/2 returned false - the SNMP agent stopped collecting messages from UDP.

-

- Own Id: OTP-8761

+

Prepared for R14B.

-
+ -
+
SNMP Development Toolkit 4.17.1

Version 4.17.1 supports code replacement in runtime from/to version 4.17, 4.16.2, 4.16.1, 4.16, 4.15, 4.14 and 4.13.5.

diff --git a/lib/snmp/doc/src/snmp_view_based_acm_mib.xml b/lib/snmp/doc/src/snmp_view_based_acm_mib.xml index ffea256608..d595f6b93b 100644 --- a/lib/snmp/doc/src/snmp_view_based_acm_mib.xml +++ b/lib/snmp/doc/src/snmp_view_based_acm_mib.xml @@ -4,7 +4,7 @@
- 19992009 + 19992010 Ericsson AB. All Rights Reserved. @@ -38,7 +38,10 @@ SNMP-VIEW-BASED-ACM-MIB, and functions for configuring the database.

The configuration files are described in the SNMP User's Manual.

+ + + configure(ConfDir) -> void() @@ -48,27 +51,24 @@

This function is called from the supervisor at system - start-up. -

+ start-up.

Inserts all data in the configuration files into the - database and destroys all old rows with StorageType - volatile. The rows created from the configuration file - will have StorageType nonVolatile. -

-

All snmp counters are set to zero. -

+ database and destroys all old rows with StorageType + volatile. The rows created from the configuration file + will have StorageType nonVolatile.

+

All snmp counters are set to zero.

If an error is found in the configuration file, it is - reported using the function config_err/2 of the error - report module, and the function fails with the reason - configuration_error. -

+ reported using the function config_err/2 of the error + report module, and the function fails with the reason + configuration_error.

ConfDir is a string which points to the directory - where the configuration files are found. -

-

The configuration file read is: vacm.conf. -

+ where the configuration files are found.

+

The configuration file read is: vacm.conf.

+ +
+ reconfigure(ConfDir) -> void() Configure the SNMP-VIEW-BASED-ACM-MIB @@ -88,18 +88,20 @@

All snmp counters are set to zero.

If an error is found in the configuration file, it is - reported using the function config_err/2 of the error - report module, and the function fails with the reason + reported using the function + config_err/2 + of the error report module, and the function fails with the reason configuration_error.

ConfDir is a string which points to the directory where the configuration files are found.

-

The configuration file read is: vacm.conf. - -

+

The configuration file read is: vacm.conf.

+ +
+ add_sec2group(SecModel, SecName, GroupName) -> Ret Add one security to group definition @@ -113,10 +115,13 @@

Adds a security to group definition to the agent config. - Equivalent to one vacmSecurityToGroup-line in the vacm.conf file.

+ Equivalent to one vacmSecurityToGroup-line in the + vacm.conf file.

+
+ delete_sec2group(Key) -> Ret Delete one security to group definition @@ -127,9 +132,11 @@

Delete a security to group definition from the agent config.

+
+ add_access(GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV) -> Ret Add one access definition @@ -148,10 +155,12 @@

Adds a access definition to the agent config. - Equivalent to one vacmAccess-line in the vacm.conf file.

- + Equivalent to one vacmAccess-line in the vacm.conf file.

+ +
+ delete_access(Key) -> Ret Delete one access definition @@ -161,10 +170,12 @@ Reason = term() -

Delete a access definition from the agent config.

- +

Delete a access definition from the agent config.

+ +
+ add_view_tree_fam(ViewIndex, SubTree, Status, Mask) -> Ret Add one view tree family definition @@ -178,11 +189,14 @@ Reason = term() -

Adds a view tree family definition to the agent config. - Equivalent to one vacmViewTreeFamily-line in the vacm.conf file.

- +

Adds a view tree family definition to the agent config. + Equivalent to one vacmViewTreeFamily-line in the + vacm.conf file.

+ +
+ delete_view_tree_fam(Key) -> Ret Delete one view tree family definition diff --git a/lib/snmp/doc/src/snmpa_error.xml b/lib/snmp/doc/src/snmpa_error.xml index a7312e8b24..4dbafdfbb7 100644 --- a/lib/snmp/doc/src/snmpa_error.xml +++ b/lib/snmp/doc/src/snmpa_error.xml @@ -4,7 +4,7 @@
- 20022009 + 20022010 Ericsson AB. All Rights Reserved. @@ -51,6 +51,8 @@ error_report_mod, see configuration parameters.

+ + @@ -67,8 +69,11 @@

Format and Args are as in io:format(Format, Args).

+ +
+ user_err(Format, Args) -> void() Called if a user related error occurs diff --git a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl index 657207b36e..5e188c74c5 100644 --- a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl +++ b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl @@ -181,6 +181,8 @@ init_tabs(Sec2Group, Access, View) -> snmpa_local_db:table_delete(db(vacmSecurityToGroupTable)), snmpa_local_db:table_create(db(vacmSecurityToGroupTable)), init_sec2group_table(Sec2Group), + ?vdebug("create vacm access table",[]), + snmpa_vacm:cleanup(), init_access_table(Access), ?vdebug("create vacm view-tree-family table",[]), snmpa_local_db:table_delete(db(vacmViewTreeFamilyTable)), diff --git a/lib/snmp/src/agent/snmpa_vacm.erl b/lib/snmp/src/agent/snmpa_vacm.erl index 2eacea4301..91cecfcd1e 100644 --- a/lib/snmp/src/agent/snmpa_vacm.erl +++ b/lib/snmp/src/agent/snmpa_vacm.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1999-2009. All Rights Reserved. +%% Copyright Ericsson AB 1999-2010. 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 @@ -21,7 +21,7 @@ -export([get_mib_view/5]). -export([init/1, init/2, backup/1]). -export([delete/1, get_row/1, get_next_row/1, insert/1, insert/2, - dump_table/0]). + cleanup/0, dump_table/0]). -include("SNMPv2-TC.hrl"). -include("SNMP-VIEW-BASED-ACM-MIB.hrl"). @@ -256,6 +256,10 @@ delete(Key) -> ets:delete(snmpa_vacm, Key), dump_table(). + +cleanup() -> + ets:delete_all_objects(snmpa_vacm). + dump_table(true) -> dump_table(); dump_table(_) -> diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index 2375e3df70..fafbf79bb7 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -22,6 +22,12 @@ %% ----- U p g r a d e ------------------------------------------------------- [ + {"4.18", + [ + {load_module, snmpa_vacm, soft_purge, soft_purge, []}, + {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmpa_vacm]} + ] + }, {"4.17.1", [ {load_module, snmp_community_mib, soft_purge, soft_purge, []}, @@ -66,6 +72,12 @@ %% ------D o w n g r a d e --------------------------------------------------- [ + {"4.18", + [ + {load_module, snmpa_vacm, soft_purge, soft_purge, []}, + {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmpa_vacm]} + ] + }, {"4.17.1", [ {load_module, snmp_community_mib, soft_purge, soft_purge, []}, diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 1229b12ae2..67cc05687d 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -1,3 +1,22 @@ -SNMP_VSN = 4.18 +#-*-makefile-*- ; force emacs to enter makefile-mode + +# %CopyrightBegin% +# +# Copyright Ericsson AB 1997-2010. 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 +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% + +SNMP_VSN = 4.18.1 PRE_VSN = APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)" -- cgit v1.2.3 From 6bd03dbc48e148d1fcad13d2301231507e49c77d Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 16 Dec 2010 14:44:18 +0100 Subject: Added dumping of data after (snmpa_vacm) cleanup call. --- lib/snmp/src/agent/snmp_view_based_acm_mib.erl | 7 ++++++- lib/snmp/src/agent/snmpa_vacm.erl | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl index 5e188c74c5..f0c4a16cee 100644 --- a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl +++ b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl @@ -181,13 +181,18 @@ init_tabs(Sec2Group, Access, View) -> snmpa_local_db:table_delete(db(vacmSecurityToGroupTable)), snmpa_local_db:table_create(db(vacmSecurityToGroupTable)), init_sec2group_table(Sec2Group), + ?vdebug("create vacm access table",[]), snmpa_vacm:cleanup(), init_access_table(Access), + ?vdebug("create vacm view-tree-family table",[]), snmpa_local_db:table_delete(db(vacmViewTreeFamilyTable)), snmpa_local_db:table_create(db(vacmViewTreeFamilyTable)), - init_view_table(View). + init_view_table(View), + + ?vdebug("table(s) initiated",[]), + ok. init_sec2group_table([Row | T]) -> % ?vtrace("init security-to-group table: " diff --git a/lib/snmp/src/agent/snmpa_vacm.erl b/lib/snmp/src/agent/snmpa_vacm.erl index 91cecfcd1e..892dc265f1 100644 --- a/lib/snmp/src/agent/snmpa_vacm.erl +++ b/lib/snmp/src/agent/snmpa_vacm.erl @@ -258,7 +258,8 @@ delete(Key) -> cleanup() -> - ets:delete_all_objects(snmpa_vacm). + ets:delete_all_objects(snmpa_vacm), + dump_table(). dump_table(true) -> dump_table(); -- cgit v1.2.3 From b16c705cb08743333dba26f036ff44cf7d4b7da8 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Thu, 17 Feb 2011 18:49:32 +0100 Subject: Fixed release notes. --- lib/snmp/doc/src/notes.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index cb41ca8e3a..3fe39c4d03 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -4,7 +4,7 @@
- 19962010 + 19962011 Ericsson AB. All Rights Reserved. @@ -50,10 +50,10 @@ snmp_view_based_acm_mib:reconfigure/1 on a running node, the table vacmAccessTable was not properly cleaned. - This means that if some entries in the vacm.conf file was removed + This meant that if some entries in the vacm.conf file was removed (compared to the current config), - while others where modified and/or added, the removed entrie(s), - would still exist in the vacmAccessTable.

+ while others where modified and/or added, the removed entrie(s) + would still exist in the vacmAccessTable table.

Own Id: OTP-8981

Aux Id: Seq 11750

-- cgit v1.2.3 From 95280cc9c09187465d423fd3481b3aa4310c4bab Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Tue, 22 Feb 2011 10:32:00 +0100 Subject: Prep for release: snmp-4.19 --- lib/snmp/doc/src/notes.xml | 8 ++++---- lib/snmp/vsn.mk | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 3fe39c4d03..39aff4e28a 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -1,4 +1,4 @@ - + @@ -33,8 +33,8 @@
- SNMP Development Toolkit 4.18.1 -

Version 4.18.1 supports code replacement in runtime from/to + SNMP Development Toolkit 4.19 +

Version 4.19 supports code replacement in runtime from/to version 4.18, 4.17.1 and 4.17.

@@ -64,7 +64,7 @@ Incompatibilities

-

-
+
SNMP 4.18 diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk index 67cc05687d..617f0fce62 100644 --- a/lib/snmp/vsn.mk +++ b/lib/snmp/vsn.mk @@ -17,6 +17,6 @@ # # %CopyrightEnd% -SNMP_VSN = 4.18.1 +SNMP_VSN = 4.19 PRE_VSN = APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)" -- cgit v1.2.3 From ca6e87e84dae13b6ebe15ca67bf98a0245f25857 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Wed, 23 Feb 2011 23:07:52 +0100 Subject: Fixed release notes and appup file. --- lib/snmp/doc/src/notes.xml | 2 +- lib/snmp/src/app/snmp.appup.src | 78 ----------------------------------------- 2 files changed, 1 insertion(+), 79 deletions(-) (limited to 'lib') diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml index 39aff4e28a..4896a62bb4 100644 --- a/lib/snmp/doc/src/notes.xml +++ b/lib/snmp/doc/src/notes.xml @@ -35,7 +35,7 @@
SNMP Development Toolkit 4.19

Version 4.19 supports code replacement in runtime from/to - version 4.18, 4.17.1 and 4.17.

+ version 4.18.

Improvements and new features diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src index fafbf79bb7..0c1d6655ef 100644 --- a/lib/snmp/src/app/snmp.appup.src +++ b/lib/snmp/src/app/snmp.appup.src @@ -27,45 +27,6 @@ {load_module, snmpa_vacm, soft_purge, soft_purge, []}, {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmpa_vacm]} ] - }, - {"4.17.1", - [ - {load_module, snmp_community_mib, soft_purge, soft_purge, []}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, []}, - {load_module, snmp_generic, soft_purge, soft_purge, []}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, []}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, []}, - {load_module, snmp_target_mib, soft_purge, soft_purge, []}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []}, - {load_module, snmpa_conf, soft_purge, soft_purge, []}, - {update, snmpa_target_cache, soft, soft_purge, soft_purge, []}, - {load_module, snmpa_usm, soft_purge, soft_purge, []}, - {load_module, snmpm, soft_purge, soft_purge, []}, - {load_module, snmpm_conf, soft_purge, soft_purge, []}, - {update, snmpm_config, soft, soft_purge, soft_purge, []}, - {load_module, snmpm_usm, soft_purge, soft_purge, []} - ] - }, - {"4.17", - [ - {load_module, snmp_community_mib, soft_purge, soft_purge, []}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, []}, - {load_module, snmp_generic, soft_purge, soft_purge, []}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, []}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, []}, - {load_module, snmp_target_mib, soft_purge, soft_purge, []}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []}, - {load_module, snmpa_conf, soft_purge, soft_purge, []}, - {update, snmpa_target_cache, soft, soft_purge, soft_purge, []}, - {load_module, snmpa_usm, soft_purge, soft_purge, []}, - {load_module, snmpm, soft_purge, soft_purge, []}, - {load_module, snmpm_conf, soft_purge, soft_purge, []}, - {update, snmpm_config, soft, soft_purge, soft_purge, []}, - {load_module, snmpm_usm, soft_purge, soft_purge, []}, - {load_module, snmpa_net_if, soft_purge, soft_purge, []} - ] } ], @@ -77,45 +38,6 @@ {load_module, snmpa_vacm, soft_purge, soft_purge, []}, {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, [snmpa_vacm]} ] - }, - {"4.17.1", - [ - {load_module, snmp_community_mib, soft_purge, soft_purge, []}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, []}, - {load_module, snmp_generic, soft_purge, soft_purge, []}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, []}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, []}, - {load_module, snmp_target_mib, soft_purge, soft_purge, []}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []}, - {load_module, snmpa_conf, soft_purge, soft_purge, []}, - {update, snmpa_target_cache, soft, soft_purge, soft_purge, []}, - {load_module, snmpa_usm, soft_purge, soft_purge, []}, - {load_module, snmpm, soft_purge, soft_purge, []}, - {load_module, snmpm_conf, soft_purge, soft_purge, []}, - {update, snmpm_config, soft, soft_purge, soft_purge, []}, - {load_module, snmpm_usm, soft_purge, soft_purge, []} - ] - }, - {"4.17", - [ - {load_module, snmp_community_mib, soft_purge, soft_purge, []}, - {load_module, snmp_framework_mib, soft_purge, soft_purge, []}, - {load_module, snmp_generic, soft_purge, soft_purge, []}, - {load_module, snmp_notification_mib, soft_purge, soft_purge, []}, - {load_module, snmp_standard_mib, soft_purge, soft_purge, []}, - {load_module, snmp_target_mib, soft_purge, soft_purge, []}, - {load_module, snmp_user_based_sm_mib, soft_purge, soft_purge, []}, - {load_module, snmp_view_based_acm_mib, soft_purge, soft_purge, []}, - {load_module, snmpa_conf, soft_purge, soft_purge, []}, - {update, snmpa_target_cache, soft, soft_purge, soft_purge, []}, - {load_module, snmpa_usm, soft_purge, soft_purge, []}, - {load_module, snmpm, soft_purge, soft_purge, []}, - {load_module, snmpm_conf, soft_purge, soft_purge, []}, - {update, snmpm_config, soft, soft_purge, soft_purge, []}, - {load_module, snmpm_usm, soft_purge, soft_purge, []}, - {load_module, snmpa_net_if, soft_purge, soft_purge, []} - ] } ] }. -- cgit v1.2.3