diff options
author | Micael Karlberg <[email protected]> | 2011-07-22 11:11:25 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2011-07-22 11:11:25 +0200 |
commit | 7ce465d8d28c778db20846c991bafc2289a85588 (patch) | |
tree | 098b7a9de06b69a16db43e83357d633ae6d57d70 /lib/snmp/src/agent | |
parent | 7437a868de13e985698b202750e0eb83c8464a25 (diff) | |
parent | 29ea8d48bbe551946069c142f7737b5bf5275773 (diff) | |
download | otp-7ce465d8d28c778db20846c991bafc2289a85588.tar.gz otp-7ce465d8d28c778db20846c991bafc2289a85588.tar.bz2 otp-7ce465d8d28c778db20846c991bafc2289a85588.zip |
[agent] The SNMP ACM cache was not properly updated when
changes where made to the VACM security-to-group, access and
view-tree-family tables.
OTP-9367
Merge branch 'bmk/snmp/agent/acm_cache_cleanup/OTP-9367' into bmk/snmp/snmp421_integration
Conflicts:
lib/snmp/doc/src/notes.xml
lib/snmp/src/app/snmp.appup.src
Diffstat (limited to 'lib/snmp/src/agent')
-rw-r--r-- | lib/snmp/src/agent/snmp_view_based_acm_mib.erl | 6 |
1 files changed, 6 insertions, 0 deletions
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 28469a7b4e..37f6dd3f26 100644 --- a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl +++ b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl @@ -247,6 +247,7 @@ add_sec2group(SecModel, SecName, GroupName) -> Key = [Key1, length(Key2) | Key2], case table_cre_row(vacmSecurityToGroupTable, Key, Row) of true -> + snmpa_agent:invalidate_ca_cache(), {ok, Key}; false -> {error, create_failed} @@ -260,6 +261,7 @@ add_sec2group(SecModel, SecName, GroupName) -> delete_sec2group(Key) -> case table_del_row(vacmSecurityToGroupTable, Key) of true -> + snmpa_agent:invalidate_ca_cache(), ok; false -> {error, delete_failed} @@ -279,6 +281,7 @@ add_access(GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV) -> Key3 = [SM, SL], Key = Key1 ++ Key2 ++ Key3, snmpa_vacm:insert([{Key, Row}], false), + snmpa_agent:invalidate_ca_cache(), {ok, Key}; {error, Reason} -> {error, Reason}; @@ -287,6 +290,7 @@ add_access(GroupName, Prefix, SecModel, SecLevel, Match, RV, WV, NV) -> end. delete_access(Key) -> + snmpa_agent:invalidate_ca_cache(), snmpa_vacm:delete(Key). @@ -299,6 +303,7 @@ add_view_tree_fam(ViewIndex, SubTree, Status, Mask) -> Key = [length(Key1) | Key1] ++ [length(Key2) | Key2], case table_cre_row(vacmViewTreeFamilyTable, Key, Row) of true -> + snmpa_agent:invalidate_ca_cache(), {ok, Key}; false -> {error, create_failed} @@ -312,6 +317,7 @@ add_view_tree_fam(ViewIndex, SubTree, Status, Mask) -> delete_view_tree_fam(Key) -> case table_del_row(vacmViewTreeFamilyTable, Key) of true -> + snmpa_agent:invalidate_ca_cache(), ok; false -> {error, delete_failed} |