aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/diameter/doc/src/diameter.xml12
-rw-r--r--lib/diameter/examples/code/peer.erl2
-rw-r--r--lib/diameter/src/base/diameter_peer_fsm.erl11
-rw-r--r--lib/diameter/src/base/diameter_service.erl65
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl25
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl36
-rw-r--r--lib/diameter/test/diameter_config_SUITE.erl2
-rw-r--r--lib/diameter/test/diameter_event_SUITE.erl30
-rw-r--r--lib/diameter/test/diameter_transport_SUITE.erl2
-rw-r--r--lib/inets/src/inets_app/inets.appup.src35
-rw-r--r--lib/inets/vsn.mk2
-rw-r--r--lib/snmp/doc/src/notes.xml63
-rw-r--r--lib/snmp/src/app/snmp.appup.src6
-rw-r--r--lib/snmp/src/compile/snmpc_lib.erl1
-rw-r--r--lib/snmp/src/manager/snmpm_net_if.erl19
-rw-r--r--lib/snmp/test/snmp_test_mgr.erl2
-rw-r--r--lib/snmp/vsn.mk2
-rw-r--r--lib/ssl/src/ssl.appup.src12
-rw-r--r--lib/ssl/src/ssl_connection.erl38
-rw-r--r--lib/ssl/src/ssl_connection.hrl24
-rw-r--r--lib/ssl/src/ssl_internal.hrl17
-rw-r--r--lib/ssl/vsn.mk2
-rw-r--r--lib/stdlib/doc/src/dict.xml2
-rw-r--r--lib/tools/doc/src/eprof.xml2
-rw-r--r--lib/tools/doc/src/fprof.xml2
25 files changed, 242 insertions, 172 deletions
diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml
index ab9ad25a3a..00b54ffbc4 100644
--- a/lib/diameter/doc/src/diameter.xml
+++ b/lib/diameter/doc/src/diameter.xml
@@ -500,6 +500,18 @@ Matches only those peers matched by each filter in the specified list.</p>
<p>
Matches only those peers matched by at least one filter in the
specified list.</p>
+
+<p>
+The resulting peer list will be in match order, peers matching the
+first filter of the list sorting before those matched by the second,
+and so on.
+For example, the following filter causes peers matching both the host
+and realm filters to be presented before those matching only the realm
+filter.</p>
+
+<pre>
+{any, [{all, [host, realm]}, realm]}
+</pre>
</item>
</taglist>
diff --git a/lib/diameter/examples/code/peer.erl b/lib/diameter/examples/code/peer.erl
index b4ee17e4b7..7519abfb2c 100644
--- a/lib/diameter/examples/code/peer.erl
+++ b/lib/diameter/examples/code/peer.erl
@@ -74,7 +74,7 @@ start(Name, Opts)
| {error, term()}.
connect(Name, T) ->
- diameter:add_transport(Name, {connect, [{reconnect_timer, 5000}
+ diameter:add_transport(Name, {connect, [{connect_timer, 5000}
| client(T)]}).
%% listen/2
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl
index 86fc43cdc5..ee6e7dd89e 100644
--- a/lib/diameter/src/base/diameter_peer_fsm.erl
+++ b/lib/diameter/src/base/diameter_peer_fsm.erl
@@ -225,8 +225,8 @@ start_transport(Addrs0, T) ->
erlang:monitor(process, TPid),
q_next(TPid, Addrs0, Tmo, Data),
{TPid, Addrs};
- No ->
- exit({shutdown, No})
+ {error, No} ->
+ exit({shutdown, {no_connection, No}})
end.
svc(#diameter_service{capabilities = LCaps0} = Svc, Addrs) ->
@@ -368,11 +368,8 @@ transition({diameter, {TPid, connected}},
%% message. This may be followed by an incoming message which arrived
%% before the transport was killed and this can't be distinguished
%% from one from the transport that's been started to replace it.
-transition({diameter, {_, connected}}, _) ->
- {stop, connection_timeout};
-transition({diameter, {_, connected, _}}, _) ->
- {stop, connection_timeout};
-transition({diameter, {_, connected, _, _}}, _) ->
+transition({diameter, T}, _)
+ when tuple_size(T) < 5, connected == element(2,T) ->
{stop, connection_timeout};
%% Connection has timed out: start an alternate.
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index ab56ca9cef..76b05a2ad4 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1460,42 +1460,52 @@ pick_peer(Local,
peers(Alias, RH, Filter, Peers) ->
case ?Dict:find(Alias, Peers) of
{ok, L} ->
- ps(L, RH, Filter, {[],[]});
+ filter(L, RH, Filter);
error ->
[]
end.
-%% Place a peer whose Destination-Host/Realm matches those of the
-%% request at the front of the result list. Could add some sort of
-%% 'sort' option to allow more control.
-
-ps([], _, _, {Ys, Ns}) ->
- lists:reverse(Ys, Ns);
-ps([{_TPid, #diameter_caps{} = Caps} = TC | Rest], RH, Filter, Acc) ->
- ps(Rest, RH, Filter, pacc(caps_filter(Caps, RH, Filter),
- caps_filter(Caps, RH, {all, [host, realm]}),
- TC,
- Acc)).
-
-pacc(true, true, Peer, {Ts, Fs}) ->
- {[Peer|Ts], Fs};
-pacc(true, false, Peer, {Ts, Fs}) ->
- {Ts, [Peer|Fs]};
-pacc(_, _, _, Acc) ->
- Acc.
+%% filter/3
+%%
+%% Return peers in match order.
-%% caps_filter/3
+filter(Peers, RH, Filter) ->
+ {Ts, _} = fltr(Peers, RH, Filter),
+ Ts.
+
+%% fltr/4
-caps_filter(C, RH, {neg, F}) ->
- not caps_filter(C, RH, F);
+fltr(Peers, _, none) ->
+ {Peers, []};
-caps_filter(C, RH, {all, L})
+fltr(Peers, RH, {neg, F}) ->
+ {Ts, Fs} = fltr(Peers, RH, F),
+ {Fs, Ts};
+
+fltr(Peers, RH, {all, L})
when is_list(L) ->
- lists:all(fun(F) -> caps_filter(C, RH, F) end, L);
+ lists:foldl(fun(F,A) -> fltr_all(F, A, RH) end,
+ {Peers, []},
+ L);
-caps_filter(C, RH, {any, L})
+fltr(Peers, RH, {any, L})
when is_list(L) ->
- lists:any(fun(F) -> caps_filter(C, RH, F) end, L);
+ lists:foldl(fun(F,A) -> fltr_any(F, A, RH) end,
+ {[], Peers},
+ L);
+
+fltr(Peers, RH, F) ->
+ lists:partition(fun({_,C}) -> caps_filter(C, RH, F) end, Peers).
+
+fltr_all(F, {Ts0, Fs0}, RH) ->
+ {Ts1, Fs1} = fltr(Ts0, RH, F),
+ {Ts1, Fs0 ++ Fs1}.
+
+fltr_any(F, {Ts0, Fs0}, RH) ->
+ {Ts1, Fs1} = fltr(Fs0, RH, F),
+ {Ts0 ++ Ts1, Fs1}.
+
+%% caps_filter/3
caps_filter(#diameter_caps{origin_host = {_,OH}}, [_,DH], host) ->
eq(undefined, DH, OH);
@@ -1508,9 +1518,6 @@ caps_filter(C, _, Filter) ->
%% caps_filter/2
-caps_filter(_, none) ->
- true;
-
caps_filter(#diameter_caps{origin_host = {_,OH}}, {host, H}) ->
eq(any, H, OH);
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl
index 280d09d7e8..3b62afca47 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -1484,7 +1484,7 @@ handle_A(Pkt, SvcName, Dict, Dict0, App, #request{transport = TPid} = Req) ->
%% a missing AVP. If both are optional in the dictionary
%% then this isn't a decode error: just continue on.
answer(Pkt, SvcName, App, Req);
- exit: {invalid_error_bit, RC} ->
+ exit: {invalid_error_bit, {_, _, _, RC}} ->
#diameter_packet{errors = Es}
= Pkt,
E = {5004, #diameter_avp{name = 'Result-Code', value = RC}},
@@ -1632,12 +1632,23 @@ send_request(TPid, #diameter_packet{} = Pkt, Req, SvcName, Timeout) ->
%% send/1
-send({TPid, Pkt, #request{handler = Pid} = Req, SvcName, Timeout, TRef}) ->
- Ref = send_request(TPid,
- Pkt,
- Req#request{handler = self()},
- SvcName,
- Timeout),
+send({TPid, Pkt, #request{handler = Pid} = Req0, SvcName, Timeout, TRef}) ->
+ Seqs = diameter_codec:sequence_numbers(Pkt),
+ Req = Req0#request{handler = self()},
+ Ref = send_request(TPid, Pkt, Req, SvcName, Timeout),
+
+ try
+ recv(TPid, Pid, TRef, Ref)
+ after
+ %% Remove only the entry for this specific send since a resend
+ %% from the originating node can pick another transport on
+ %% this one.
+ ets:delete_object(?REQUEST_TABLE, {Seqs, Req, Ref})
+ end.
+
+%% recv/4
+
+recv(TPid, Pid, TRef, Ref) ->
receive
{answer, _, _, _, _} = A ->
Pid ! A;
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index eff5096745..b7f2d24941 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -255,11 +255,15 @@ close({'DOWN', _, process, TPid, {shutdown, Reason}},
close(_, _) ->
ok.
-event(_, #watchdog{status = T}, #watchdog{status = T}) ->
- ok;
-
-event(_, #watchdog{transport = undefined}, #watchdog{transport = undefined}) ->
+event(_,
+ #watchdog{status = From, transport = F},
+ #watchdog{status = To, transport = T})
+ when F == undefined, T == undefined; %% transport not started
+ From == initial, To == down; %% never really left INITIAL
+ From == To -> %% no state transition
ok;
+%% Note that there is no INITIAL -> DOWN transition in RFC 3539: ours
+%% is just a consequence of stop.
event(Msg,
#watchdog{status = From, transport = F, parent = Pid},
@@ -411,7 +415,7 @@ transition({'DOWN', _, process, TPid, _Reason},
stop;
%% ... or not.
-transition({'DOWN', _, process, TPid, _Reason},
+transition({'DOWN', _, process, TPid, _Reason} = D,
#watchdog{transport = TPid,
status = T,
restrict = {_,R}}
@@ -422,20 +426,14 @@ transition({'DOWN', _, process, TPid, _Reason},
%% Close an accepting watchdog immediately if there's no
%% restriction on the number of connections to the same peer: the
- %% state machine never enters state REOPEN in this case. The
- %% 'close' message (instead of stop) is so as not to bypass the
- %% sending of messages to the service process in handle_info/2.
-
- if T /= initial, M == accept, not R ->
- send(self(), close),
- S#watchdog{status = down};
- T /= initial ->
- set_watchdog(S#watchdog{status = down});
- M == connect ->
- set_watchdog(S);
- M == accept ->
- send(self(), close),
- S
+ %% state machine never enters state REOPEN in this case.
+
+ if T == initial;
+ M == accept, not R ->
+ close(D, S0),
+ stop;
+ true ->
+ set_watchdog(S#watchdog{status = down})
end;
%% Incoming message.
diff --git a/lib/diameter/test/diameter_config_SUITE.erl b/lib/diameter/test/diameter_config_SUITE.erl
index d10ee83ba4..ad5b3f9420 100644
--- a/lib/diameter/test/diameter_config_SUITE.erl
+++ b/lib/diameter/test/diameter_config_SUITE.erl
@@ -157,7 +157,7 @@
{length_errors,
[[exit], [handle], [discard]],
[[x]]},
- {reconnect_timer,
+ {connect_timer,
[[3000]],
[[infinity]]},
{watchdog_timer,
diff --git a/lib/diameter/test/diameter_event_SUITE.erl b/lib/diameter/test/diameter_event_SUITE.erl
index 94b4967921..f43f111d20 100644
--- a/lib/diameter/test/diameter_event_SUITE.erl
+++ b/lib/diameter/test/diameter_event_SUITE.erl
@@ -107,29 +107,38 @@ start_server(Config) ->
%% Connect with matching capabilities and expect the connection to
%% come up.
up(Config) ->
- {Svc, Ref} = connect(Config, []),
+ {Svc, Ref} = connect(Config, [{connect_timer, 5000},
+ {watchdog_timer, 15000}]),
start = event(Svc),
- {up, Ref, {_,_Caps}, _Config, #diameter_packet{}} = event(Svc),
- {watchdog, Ref, _, {initial, okay}, _} = event(Svc).
+ {up, Ref, {TPid, Caps}, Cfg, #diameter_packet{}} = event(Svc),
+ {watchdog, Ref, _, {initial, okay}, _} = event(Svc),
+ %% Kill the transport process and see that the connection is
+ %% reestablished after a watchdog timeout, not after connect_timer
+ %% expiry.
+ exit(TPid, kill),
+ {down, Ref, {TPid, Caps}, Cfg} = event(Svc),
+ {watchdog, Ref, _, {okay, down}, _} = event(Svc),
+ {reconnect, Ref, _} = event(Svc, 10000, 20000).
%% Connect with non-matching capabilities and expect CEA from the peer
%% to indicate as much and then for the transport to be restarted
-%% (after reconnect_timer).
+%% (after connect_timer).
down(Config) ->
{Svc, Ref} = connect(Config, [{capabilities, [{'Acct-Application-Id',
[?DICT_ACCT:id()]}]},
{applications, [?DICT_ACCT]},
- {reconnect_timer, 5000}]),
+ {connect_timer, 5000},
+ {watchdog_timer, 20000}]),
start = event(Svc),
{closed, Ref, {'CEA', ?NO_COMMON_APP, _, #diameter_packet{}}, _}
= event(Svc),
- {reconnect, Ref, _} = event(Svc).
+ {reconnect, Ref, _} = event(Svc, 4000, 10000).
%% Connect with matching capabilities but have the server delay its
%% CEA and cause the client to timeout.
cea_timeout(Config) ->
{Svc, Ref} = connect(Config, [{capx_timeout, ?SERVER_CAPX_TMO div 2},
- {reconnect_timer, 2*?SERVER_CAPX_TMO}]),
+ {connect_timer, 2*?SERVER_CAPX_TMO}]),
start = event(Svc),
{closed, Ref, {'CEA', timeout}, _} = event(Svc).
@@ -165,6 +174,13 @@ uniq() ->
event(Name) ->
receive #diameter_event{service = Name, info = T} -> T end.
+event(Name, TL, TH) ->
+ T0 = now(),
+ Event = event(Name),
+ DT = timer:now_diff(now(), T0) div 1000,
+ {true, true, DT, Event} = {TL < DT, DT < TH, DT, Event},
+ Event.
+
start_service(Name, Opts) ->
diameter:start_service(Name, [{monitor, self()} | Opts]).
diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl
index 9408fae62c..fcffa69c24 100644
--- a/lib/diameter/test/diameter_transport_SUITE.erl
+++ b/lib/diameter/test/diameter_transport_SUITE.erl
@@ -194,7 +194,7 @@ reconnect({connect, Ref}) ->
true = diameter:subscribe(SvcName),
ok = start_service(SvcName),
[{{_, _, LRef}, Pid}] = diameter_reg:wait({?MODULE, Ref, '_'}),
- CRef = ?util:connect(SvcName, tcp, LRef, [{reconnect_timer, 2000},
+ CRef = ?util:connect(SvcName, tcp, LRef, [{connect_timer, 2000},
{watchdog_timer, 6000}]),
%% Tell partner to kill transport after seeing that there are no
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index 4bc49e1e67..90524ac367 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -17,44 +17,9 @@
%% %CopyrightEnd%
{"%VSN%",
[
- {"5.10.2",
- [
- {load_module, httpd_request_handler, soft_purge, soft_purge,
- []}]},
- {"5.10.1",
- [{load_module, httpc_handler, soft_purge, soft_purge, []},
- {load_module, httpd, soft_purge, soft_purge, []},
- {load_module, httpd_manager, soft_purge, soft_purge, []},
- {load_module, httpd_request, soft_purge, soft_purge, []},
- {load_module, httpd_request_handler, soft_purge, soft_purge,
- []}]},
- {"5.10",
- [{load_module, httpc_handler, soft_purge, soft_purge, []},
- {load_module, httpd, soft_purge, soft_purge, []},
- {load_module, httpd_manager, soft_purge, soft_purge, []},
- {load_module, httpd_request, soft_purge, soft_purge, []},
- {load_module, httpd_request_handler, soft_purge, soft_purge,
- []}]},
{<<"5\\..*">>,[{restart_application, inets}]}
],
[
- {"5.10.2",
- [
- {load_module, httpd_request_handler, soft_purge, soft_purge,
- []}]},
- {"5.10.1",
- [{load_module, httpc_handler, soft_purge, soft_purge, []},
- {load_module, httpd, soft_purge, soft_purge, []},
- {load_module, httpd_manager, soft_purge, soft_purge, []},
- {load_module, httpd_request, soft_purge, soft_purge, []},
- {load_module, httpd_request_handler, soft_purge, soft_purge,
- []}]},
- {"5.10",
- [{load_module, httpc_handler, soft_purge, soft_purge, []},
- {load_module, httpd, soft_purge, soft_purge, []},
- {load_module, httpd_manager, soft_purge, soft_purge, []},
- {load_module, httpd_request, soft_purge, soft_purge, []},
- {load_module, httpd_request_handler, soft_purge, soft_purge, []}]},
{<<"5\\..*">>,[{restart_application, inets}]}
]
}.
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index 029f6ac4d2..dbae5e4b3c 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 5.10.3
+INETS_VSN = 5.10.4
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index bbe6438f04..fd307ef824 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -33,6 +33,69 @@
</header>
+ <section>
+ <title>SNMP Development Toolkit 5.1.1</title>
+ <p>Version 5.1.1 supports code replacement in runtime from/to
+ version 5.1. </p>
+
+ <section>
+ <title>Improvements and new features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>[compiler] Refinement of type Opaque was not allowed. </p>
+ <p>MIB constructs such as '<c>SYNTAX Opaque (SIZE(0..65535))</c>'
+ was previously not allowed,
+ see the standard <c>ALARM-MIB</c> for eaxmple. </p>
+ <p>Own Id: OTP-12066</p>
+ <p>Aux Id: Seq 12669</p>
+ </item>
+
+ </list>
+
+ </section>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[agent]
+ see <seealso marker="snmpa#load_mibs">load_mibs</seealso> and
+ <seealso marker="snmpa#unload_mibs">unload_mibs</seealso>. </p>
+ <p>Own Id: OTP-11216</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[manager] The old Addr-and-Port based API functions, previously
+ long deprecated and marked for deletion in R16B, has now been
+ removed. </p>
+ <p>Own Id: OTP-10027</p>
+ </item>
+
+ </list>
+-->
+ </section>
+ </section> <!-- 5.1.1 -->
+
+
+
<section><title>SNMP 5.1</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index 1cc1a17b1d..e7e54f5b7e 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -28,9 +28,12 @@
%% {update, snmpa_local_db, soft, soft_purge, soft_purge, []}
%% {add_module, snmpm_net_if_mt}
[
+ {"5.1", [ % Only compiler changes
+ ]},
{"5.0", [{restart_application, snmp}]},
{"4.25.1", [{restart_application, snmp}]},
{"4.25.0.1", [{restart_application, snmp}]},
+ {"4.25.0.0.1", [{restart_application, snmp}]},
{"4.25", [{restart_application, snmp}]},
{"4.24.2", [{restart_application, snmp}]},
{"4.24.1", [{restart_application, snmp}]},
@@ -43,9 +46,12 @@
%% {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
[
+ {"5.1", [ % Only compiler changes
+ ]},
{"5.0", [{restart_application, snmp}]},
{"4.25.1", [{restart_application, snmp}]},
{"4.25.0.1", [{restart_application, snmp}]},
+ {"4.25.0.0.1", [{restart_application, snmp}]},
{"4.25", [{restart_application, snmp}]},
{"4.24.2", [{restart_application, snmp}]},
{"4.24.1", [{restart_application, snmp}]},
diff --git a/lib/snmp/src/compile/snmpc_lib.erl b/lib/snmp/src/compile/snmpc_lib.erl
index 5a661cf194..0f6393eeef 100644
--- a/lib/snmp/src/compile/snmpc_lib.erl
+++ b/lib/snmp/src/compile/snmpc_lib.erl
@@ -139,6 +139,7 @@ allow_size_rfc1902('Integer32') -> true;
allow_size_rfc1902('Unsigned32') -> true;
allow_size_rfc1902('OCTET STRING') -> true;
allow_size_rfc1902('Gauge32') -> true;
+allow_size_rfc1902('Opaque') -> true;
allow_size_rfc1902(_) -> false.
guess_integer_type() ->
diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl
index cb72871177..b4cc165d2e 100644
--- a/lib/snmp/src/manager/snmpm_net_if.erl
+++ b/lib/snmp/src/manager/snmpm_net_if.erl
@@ -319,7 +319,7 @@ socket_open(IpPort, SocketOpts) ->
Socket
end.
-socket_params(Domain, {IpAddr, IpPort}, BindTo, CommonSocketOpts) ->
+socket_params(Domain, {IpAddr, IpPort} = Addr, BindTo, CommonSocketOpts) ->
Family = snmp_conf:tdomain_to_family(Domain),
SocketOpts =
case Family of
@@ -340,15 +340,18 @@ socket_params(Domain, {IpAddr, IpPort}, BindTo, CommonSocketOpts) ->
{0, [{fd, Fd} | SocketOpts]}
end;
error ->
- {IpPort, [{ip, IpAddr} | SocketOpts]}
+ socket_params(SocketOpts, Addr, BindTo)
end;
_ ->
- case BindTo of
- true ->
- {IpPort, [{ip, IpAddr} | SocketOpts]};
- _ ->
- {IpPort, SocketOpts}
- end
+ socket_params(SocketOpts, Addr, BindTo)
+ end.
+%%
+socket_params(SocketOpts, {IpAddr, IpPort}, BindTo) ->
+ case BindTo of
+ true ->
+ {IpPort, [{ip, IpAddr} | SocketOpts]};
+ _ ->
+ {IpPort, SocketOpts}
end.
common_socket_opts(Opts) ->
diff --git a/lib/snmp/test/snmp_test_mgr.erl b/lib/snmp/test/snmp_test_mgr.erl
index cf62edba1c..8cb6ec588e 100644
--- a/lib/snmp/test/snmp_test_mgr.erl
+++ b/lib/snmp/test/snmp_test_mgr.erl
@@ -161,7 +161,7 @@ get_timeout() ->
get_timeout(os:type())
end.
-get_timeout(_) -> 3500.
+get_timeout(_) -> 10000. % Trying to improve test results % 3500.
%%----------------------------------------------------------------------
%% Receives a trap from the agent.
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index b436a79076..345cc790f2 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = snmp
-SNMP_VSN = 5.1
+SNMP_VSN = 5.1.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)"
diff --git a/lib/ssl/src/ssl.appup.src b/lib/ssl/src/ssl.appup.src
index 9d692379b4..b713f86c1e 100644
--- a/lib/ssl/src/ssl.appup.src
+++ b/lib/ssl/src/ssl.appup.src
@@ -1,24 +1,12 @@
%% -*- erlang -*-
{"%VSN%",
[
- {"5.3.6", [{load_module, ssl_handshake, soft_purge, soft_purge, [ssl_connection]}]},
- {"5.3.5", [{load_module, ssl, soft_purge, soft_purge, [ssl_connection]},
- {load_module, ssl_handshake, soft_purge, soft_purge, [ssl_certificate]},
- {load_module, ssl_certificate, soft_purge, soft_purge, []},
- {load_module, ssl_connection, soft_purge, soft_purge, [tls_connection]},
- {update, tls_connection, {advanced, {up, "5.3.5", "5.3.6"}}, [ssl_handshake]}]},
{<<"5\\.3\\.[1-4]($|\\..*)">>, [{restart_application, ssl}]},
{<<"5\\.[0-2]($|\\..*)">>, [{restart_application, ssl}]},
{<<"4\\..*">>, [{restart_application, ssl}]},
{<<"3\\..*">>, [{restart_application, ssl}]}
],
[
- {"5.3.6", [{load_module, ssl_handshake, soft_purge, soft_purge, [ssl_connection]}]},
- {"5.3.5", [{load_module, ssl, soft_purge, soft_purge,[ssl_certificate]},
- {load_module, ssl_handshake, soft_purge, soft_purge,[ssl_certificate]},
- {load_module, ssl_certificate, soft_purge, soft_purge,[]},
- {load_module, ssl_connection, soft_purge, soft_purge,[tls_connection]},
- {update, tls_connection, {advanced, {down, "5.3.6", "5.3.5"}}, [ssl_handshake]}]},
{<<"5\\.3\\.[1-4]($|\\..*)">>, [{restart_application, ssl}]},
{<<"5\\.[0-2]($|\\..*)">>, [{restart_application, ssl}]},
{<<"4\\..*">>, [{restart_application, ssl}]},
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 8ff9913cee..b6059eac58 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -937,27 +937,27 @@ terminate(_Reason, _StateName, #state{transport_cb = Transport,
Transport:close(Socket).
format_status(normal, [_, State]) ->
- [{data, [{"StateData", State}]}];
+ [{data, [{"StateData", State}]}];
format_status(terminate, [_, State]) ->
SslOptions = (State#state.ssl_options),
- NewOptions = SslOptions#ssl_options{password = "***",
- cert = "***",
- cacerts = "***",
- key = "***",
- dh = "***",
- psk_identity = "***",
- srp_identity = "***"},
- [{data, [{"StateData", State#state{connection_states = "***",
- protocol_buffers = "***",
- user_data_buffer = "***",
- tls_handshake_history = "***",
- session = "***",
- private_key = "***",
- diffie_hellman_params = "***",
- diffie_hellman_keys = "***",
- srp_params = "***",
- srp_keys = "***",
- premaster_secret = "***",
+ NewOptions = SslOptions#ssl_options{password = ?SECRET_PRINTOUT,
+ cert = ?SECRET_PRINTOUT,
+ cacerts = ?SECRET_PRINTOUT,
+ key = ?SECRET_PRINTOUT,
+ dh = ?SECRET_PRINTOUT,
+ psk_identity = ?SECRET_PRINTOUT,
+ srp_identity = ?SECRET_PRINTOUT},
+ [{data, [{"StateData", State#state{connection_states = ?SECRET_PRINTOUT,
+ protocol_buffers = ?SECRET_PRINTOUT,
+ user_data_buffer = ?SECRET_PRINTOUT,
+ tls_handshake_history = ?SECRET_PRINTOUT,
+ session = ?SECRET_PRINTOUT,
+ private_key = ?SECRET_PRINTOUT,
+ diffie_hellman_params = ?SECRET_PRINTOUT,
+ diffie_hellman_keys = ?SECRET_PRINTOUT,
+ srp_params = ?SECRET_PRINTOUT,
+ srp_keys = ?SECRET_PRINTOUT,
+ premaster_secret = ?SECRET_PRINTOUT,
ssl_options = NewOptions
}}]}].
%%--------------------------------------------------------------------
diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl
index c544a0591f..b9a1ef3a84 100644
--- a/lib/ssl/src/ssl_connection.hrl
+++ b/lib/ssl/src/ssl_connection.hrl
@@ -46,11 +46,11 @@
socket :: port(),
ssl_options :: #ssl_options{},
socket_options :: #socket_options{},
- connection_states :: #connection_states{},
- protocol_buffers :: term(), %% #protocol_buffers{} from tls_record.hrl or dtls_recor.hrl
- tls_handshake_history :: ssl_handshake:ssl_handshake_history(),
+ connection_states :: #connection_states{} | secret_printout(),
+ protocol_buffers :: term() | secret_printout() , %% #protocol_buffers{} from tls_record.hrl or dtls_recor.hrl
+ tls_handshake_history :: ssl_handshake:ssl_handshake_history() | secret_printout(),
cert_db :: reference(),
- session :: #session{},
+ session :: #session{} | secret_printout(),
session_cache :: db_handle(),
session_cache_cb :: atom(),
negotiated_version :: ssl_record:ssl_version(),
@@ -58,18 +58,18 @@
key_algorithm :: ssl_cipher:key_algo(),
hashsign_algorithm = {undefined, undefined},
cert_hashsign_algorithm,
- public_key_info ::ssl_handshake:public_key_info(),
- private_key ::public_key:private_key(),
- diffie_hellman_params, % PKIX: #'DHParameter'{} relevant for server side
- diffie_hellman_keys, % {PublicKey, PrivateKey}
+ public_key_info :: ssl_handshake:public_key_info(),
+ private_key :: public_key:private_key() | secret_printout(),
+ diffie_hellman_params:: #'DHParameter'{} | undefined | secret_printout(),
+ diffie_hellman_keys :: {PublicKey :: binary(), PrivateKey :: binary()} | #'ECPrivateKey'{} | undefined | secret_printout(),
psk_identity :: binary(), % server psk identity hint
- srp_params :: #srp_user{},
- srp_keys ::{PublicKey :: binary(), PrivateKey :: binary()},
- premaster_secret :: binary(),
+ srp_params :: #srp_user{} | secret_printout(),
+ srp_keys ::{PublicKey :: binary(), PrivateKey :: binary()} | secret_printout(),
+ premaster_secret :: binary() | secret_printout() ,
file_ref_db :: db_handle(),
cert_db_ref :: certdb_ref(),
bytes_to_read :: undefined | integer(), %% bytes to read in passive mode
- user_data_buffer :: undefined | binary(),
+ user_data_buffer :: undefined | binary() | secret_printout(),
renegotiation :: undefined | {boolean(), From::term() | internal | peer},
start_or_recv_from :: term(),
timer :: undefined | reference(), % start_or_recive_timer
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
index 85724de4bd..75efb64e3f 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
@@ -24,6 +24,8 @@
-include_lib("public_key/include/public_key.hrl").
+-define(SECRET_PRINTOUT, "***").
+
-type reason() :: term().
-type reply() :: term().
-type msg() :: term().
@@ -36,6 +38,7 @@
-type issuer() :: tuple().
-type serialnumber() :: integer().
-type cert_key() :: {reference(), integer(), issuer()}.
+-type secret_printout() :: list().
%% basic binary constructors
-define(BOOLEAN(X), X:8/unsigned-big-integer).
@@ -81,16 +84,16 @@
validate_extensions_fun,
depth :: integer(),
certfile :: binary(),
- cert :: public_key:der_encoded(),
+ cert :: public_key:der_encoded() | secret_printout(),
keyfile :: binary(),
- key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', public_key:der_encoded()},
- password :: string(),
- cacerts :: [public_key:der_encoded()],
+ key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', public_key:der_encoded()} | secret_printout(),
+ password :: string() | secret_printout(),
+ cacerts :: [public_key:der_encoded()] | secret_printout(),
cacertfile :: binary(),
- dh :: public_key:der_encoded(),
- dhfile :: binary(),
+ dh :: public_key:der_encoded() | secret_printout(),
+ dhfile :: binary() | secret_printout(),
user_lookup_fun, % server option, fun to lookup the user
- psk_identity :: binary(),
+ psk_identity :: binary() | secret_printout() ,
srp_identity, % client option {User, Password}
ciphers, %
%% Local policy for the server if it want's to reuse the session
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index da20ed8593..bda974da0e 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1 +1 @@
-SSL_VSN = 5.3.7
+SSL_VSN = 5.3.8
diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml
index 942fd1f45e..0771682a25 100644
--- a/lib/stdlib/doc/src/dict.xml
+++ b/lib/stdlib/doc/src/dict.xml
@@ -121,7 +121,7 @@
<c><anno>Dict</anno></c> together with an extra argument <c>Acc</c>
(short for accumulator). <c><anno>Fun</anno></c> must return a new
accumulator which is passed to the next call. <c><anno>Acc0</anno></c> is
- returned if the list is empty. The evaluation order is
+ returned if the dict is empty. The evaluation order is
undefined.</p>
</desc>
</func>
diff --git a/lib/tools/doc/src/eprof.xml b/lib/tools/doc/src/eprof.xml
index 3ebacf5546..73fd563fbd 100644
--- a/lib/tools/doc/src/eprof.xml
+++ b/lib/tools/doc/src/eprof.xml
@@ -35,7 +35,7 @@
used. The profiling is done using the Erlang trace BIFs. Tracing of
local function calls for a specified set of processes is enabled when
profiling is begun, and disabled when profiling is stopped.</p>
- <p>When using Eprof expect a slowdown in program execution.</p>
+ <p>When using Eprof, expect a slowdown in program execution.</p>
</description>
<funcs>
<func>
diff --git a/lib/tools/doc/src/fprof.xml b/lib/tools/doc/src/fprof.xml
index ef8b82c9fa..f83c049fcd 100644
--- a/lib/tools/doc/src/fprof.xml
+++ b/lib/tools/doc/src/fprof.xml
@@ -789,7 +789,7 @@ create_file_slow(FD, M, N) ->
function was first unsuspended and then garbage
collected. Otherwise the printout would show
<c>garbage_collect</c> being called from <c>suspend</c> but not
- not which function that might have caused the garbage
+ which function that might have caused the garbage
collection.
</p>
<p>Let us now get back to the test code:</p>