diff options
author | Ingela Anderton Andin <[email protected]> | 2016-01-12 10:20:41 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-01-21 11:41:42 +0100 |
commit | 290dffee0f7af744c86d69234fb2d8ed1c4b8a6b (patch) | |
tree | c99f5a31bf75913dc5639c84c3417af93732f385 /lib | |
parent | 931b51693132839c3bc0edc3ed01364135293c1b (diff) | |
download | otp-290dffee0f7af744c86d69234fb2d8ed1c4b8a6b.tar.gz otp-290dffee0f7af744c86d69234fb2d8ed1c4b8a6b.tar.bz2 otp-290dffee0f7af744c86d69234fb2d8ed1c4b8a6b.zip |
Snmp agent vacmViewTreeFamily with non 'null' mask bugfix
Adresses problems desciribed in
http://erlang.org/pipermail/erlang-bugs/2015-April/004891.html
http://erlang.org/pipermail/erlang-patches/2015-April/004766.html
The original patch also suggested the following fix.
However we need more information to be able to understand if
this is correct or not, and it does not have priority at the moment
for us to investigate.
@@ -816,7 +816,7 @@ next_node(D, {tree, Tree, {table_entry, _MibName}},
"~n RevOidSoFar: ~p"
"~n MibView: ~p", [size(Tree), Oid, RevOidSoFar, MibView]),
OidSoFar = lists:reverse(RevOidSoFar),
- case snmpa_acm:is_definitely_not_in_mib_view(OidSoFar, MibView) of
+ case snmpa_acm:is_definitely_not_in_mib_view(OidSoFar ++ Oid, MibView) of
true ->
?vdebug("next_node(tree,table_entry) -> not in mib view",[]),
false;
Diffstat (limited to 'lib')
-rw-r--r-- | lib/snmp/src/agent/snmp_view_based_acm_mib.erl | 2 | ||||
-rw-r--r-- | lib/snmp/src/agent/snmpa_acm.erl | 4 |
2 files changed, 4 insertions, 2 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 586b7c7171..9e6aa74d45 100644 --- a/lib/snmp/src/agent/snmp_view_based_acm_mib.erl +++ b/lib/snmp/src/agent/snmp_view_based_acm_mib.erl @@ -34,6 +34,8 @@ %% Internal exports -export([check_vacm/1]). +%% +-export([emask2imask/1]). -include("snmp_types.hrl"). diff --git a/lib/snmp/src/agent/snmpa_acm.erl b/lib/snmp/src/agent/snmpa_acm.erl index 7327575846..0264c6a992 100644 --- a/lib/snmp/src/agent/snmpa_acm.erl +++ b/lib/snmp/src/agent/snmpa_acm.erl @@ -280,7 +280,7 @@ validate_mib_view(Oid, MibView) -> end. get_largest_family([{SubTree, Mask, Type} | T], Oid, Res) -> - case check_mask(Oid, SubTree, Mask) of + case check_mask(Oid, SubTree, snmp_view_based_acm_mib:emask2imask(Mask)) of true -> get_largest_family(T, Oid, add_res(length(SubTree), SubTree, Type, Res)); false -> get_largest_family(T, Oid, Res) @@ -345,7 +345,7 @@ validate_all_mib_view([], _MibView) -> %% intelligent. %%----------------------------------------------------------------- is_definitely_not_in_mib_view(Oid, [{SubTree, Mask,?view_included}|T]) -> - case check_maybe_mask(Oid, SubTree, Mask) of + case check_maybe_mask(Oid, SubTree, snmp_view_based_acm_mib:emask2imask(Mask)) of true -> false; false -> is_definitely_not_in_mib_view(Oid, T) end; |