aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmp_target_mib.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/snmp/src/agent/snmp_target_mib.erl')
-rw-r--r--lib/snmp/src/agent/snmp_target_mib.erl15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/snmp/src/agent/snmp_target_mib.erl b/lib/snmp/src/agent/snmp_target_mib.erl
index cff1e253c3..3bcfd469e6 100644
--- a/lib/snmp/src/agent/snmp_target_mib.erl
+++ b/lib/snmp/src/agent/snmp_target_mib.erl
@@ -263,7 +263,7 @@ check_target_addr(
TagList, Params, EngineId, Mask, MMS]),
snmp_conf:check_string(Name,{gt,0}),
snmp_conf:check_domain(Domain),
- NAddress = snmp_conf:check_address(Domain, Address),
+ NAddress = check_address(Domain, Address),
snmp_conf:check_integer(Timeout, {gte, 0}),
snmp_conf:check_integer(RetryCount, {gte,0}),
snmp_conf:check_string(TagList),
@@ -290,19 +290,20 @@ check_address(Domain, Address) ->
case snmp_conf:check_address(Domain, Address) of
ok ->
Address;
- {ok, FixedAddress} ->
- FixedAddress
+ {ok, NAddress} ->
+ NAddress
end.
-check_mask(_Domain, []) ->
- [];
+check_mask(_Domain, [] = Mask) ->
+ Mask;
check_mask(Domain, Mask) ->
try check_address(Domain, Mask)
catch
- {error, {invalid_address, Info}} ->
- error({invalid_mask, Info})
+ {error, {bad_address, Info}} ->
+ error({bad_mask, Info})
end.
+
%%-----------------------------------------------------------------
%% TargetParams
%% {Name, MPModel, SecurityModel, SecurityName, SecurityLevel}