aboutsummaryrefslogtreecommitdiffstats
path: root/lib/snmp/src/agent/snmpa_mpd.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2011-07-22 18:40:36 +0200
committerErlang/OTP <[email protected]>2011-07-22 18:40:36 +0200
commit48048a64e6d47fbdfda502bc9550aaa4d0d80cfb (patch)
tree1e93c32a23be2879f4f1088c7ed40e4e0e631492 /lib/snmp/src/agent/snmpa_mpd.erl
parent9e2b8f8ab28cb74be951945ac4ea1df1f8bb0960 (diff)
parent7ff8a86fea6cf69caab7e22e5a2bb8e44dbdbd0d (diff)
downloadotp-48048a64e6d47fbdfda502bc9550aaa4d0d80cfb.tar.gz
otp-48048a64e6d47fbdfda502bc9550aaa4d0d80cfb.tar.bz2
otp-48048a64e6d47fbdfda502bc9550aaa4d0d80cfb.zip
Merge branch 'bmk/snmp/snmp421_integration' into maint-r14
* bmk/snmp/snmp421_integration: Fixed install directory typo for man3. Peter Lemenkov. Hans Ulrich Niedermann. The snmp config tool could not handle (manager) audit trail config because the option seqno was not handled. OTP-9354 [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 Added marker id's in the snmpc(command) to allow linking top specific compiler options. Updated release notes accordingly. OTP-9437 [manager] There was no way to specify transport domain. The transport domains was assumed to be IPv4 (transportDomainUdpIpv4). This has now been changed so that it can also be IPv6 (transportDomainUdpIpv6). To facilitate this, the transport domain, tdomain, is now a (new) valid option when registering (snmpm#register_agent) a new agent (and updating (snmpm#update_agent_info) agent info). This also mean that the transport behaviour has changed. Fixed appup file. OTP-9305 [compiler] Make documentation for the snmpc escript regarding the the new option for warnings as errors ("--wae" in this case). Tuncer Ayaz. OTP-9437 [compiler] Added the option warnings_as_errors which specifies whether warnings should be treated as errors. Tuncer Ayaz. OTP-9437 Fixed unintended build to ebin dir of snmpc escript. Cosmetics indenting... Removed "crap" that somehow had gotten into the file (escape sequence). Fixed install of MIB compiler escript. Was incorrectly installed both in bin end ebin. Fixed (uncommented) test cases. Improved (transport) domain error reporting. Fixed release notes and API documentation for tdomain.xs transport domain config option named tdomain. Removed debug printouts. transport domain error detection. [manager] No way to specify transport domain. Transport domains was assumed to be IPv4. This has now been changed so that it can also be IPv6. To facilitate this, the transportDomain is now a (new) valid option. This also mean that the transport behaviour has changed. OTP-9305 Updated version. [agent] Did not handle transport domains properly in some cases. OTP-9400 Utility make target for cleanig the repo... ...
Diffstat (limited to 'lib/snmp/src/agent/snmpa_mpd.erl')
-rw-r--r--lib/snmp/src/agent/snmpa_mpd.erl15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/snmp/src/agent/snmpa_mpd.erl b/lib/snmp/src/agent/snmpa_mpd.erl
index d71786b4a7..4f50b1a674 100644
--- a/lib/snmp/src/agent/snmpa_mpd.erl
+++ b/lib/snmp/src/agent/snmpa_mpd.erl
@@ -990,7 +990,7 @@ generate_discovery_msg(NoteStore, {TDomain, TAddress},
ContextName, Timeout) ->
{ok, {_Domain, Address}} = transform_taddr(TDomain, TAddress),
-
+
%% 7.1.7
?vdebug("generate_discovery_msg -> 7.1.7 (~w)", [ManagerEngineID]),
MsgID = generate_msg_id(),
@@ -1080,8 +1080,13 @@ transform_taddr(?transportDomainUdpIpv6,
{ok, {Domain, Address}};
transform_taddr(?transportDomainUdpIpv6, BadAddr) ->
{error, {bad_transportDomainUdpIpv6_address, BadAddr}};
-transform_taddr(BadTDomain, BadTAddress) ->
- {error, {bad_domain, BadTDomain, BadTAddress}}.
+transform_taddr(BadTDomain, TAddress) ->
+ case lists:member(BadTDomain, snmp_conf:all_tdomains()) of
+ true ->
+ {error, {unsupported_tdomain, BadTDomain, TAddress}};
+ false ->
+ {error, {unknown_tdomain, BadTDomain, TAddress}}
+ end.
process_taddrs(Dests) ->
@@ -1093,7 +1098,7 @@ process_taddrs([], Acc) ->
?vtrace("process_taddrs -> entry when done with"
"~n Acc: ~p", [Acc]),
lists:reverse(Acc);
-
+
%% v3
process_taddrs([{{TDomain, TAddress}, SecData} | T], Acc) ->
?vtrace("process_taddrs -> entry when v3 with"
@@ -1130,7 +1135,7 @@ process_taddrs([{TDomain, TAddress} | T], Acc) ->
process_taddrs(T, Acc)
end;
process_taddrs(Crap, Acc) ->
- throw({error, {taddrs_crap, Crap, Acc}}).
+ throw({error, {bad_taddrs, Crap, Acc}}).
mk_v1_v2_packet_list(To, Packet, Len, Pdu) ->