aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_vacm.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2010-12-07 13:46:13 +0100
committerMicael Karlberg <[email protected]>2010-12-07 13:46:13 +0100
commitaa7bbf1ec743389c1b3a461fa40a858800ae5049 (patch)
treec3ad3930019c3c229cc13f65cf6e7f6b4dcd7a9a /lib/snmp/src/agent/snmpa_vacm.erl
parentada2a055fd183082bcefd5e4b94477959e75ebee (diff)
downloadotp-aa7bbf1ec743389c1b3a461fa40a858800ae5049.tar.gz
otp-aa7bbf1ec743389c1b3a461fa40a858800ae5049.tar.bz2
otp-aa7bbf1ec743389c1b3a461fa40a858800ae5049.zip
[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.
Diffstat (limited to 'lib/snmp/src/agent/snmpa_vacm.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_vacm.erl8
1 files changed, 6 insertions, 2 deletions
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(_) ->