From 8ab02314baa4bf6fd1e3769b7222943a7084db28 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?John=20H=C3=B6gberg?=
Date: Mon, 9 Oct 2017 08:59:32 +0200
Subject: Add zlib:set_controlling_process/2
---
lib/kernel/test/zlib_SUITE.erl | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
(limited to 'lib')
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index d17eded811..1afcd155b3 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -978,23 +978,37 @@ split_bin(Last,Acc) ->
only_allow_owner(Config) when is_list(Config) ->
Z = zlib:open(),
+ Owner = self(),
?m(ok, zlib:inflateInit(Z)),
?m(ok, zlib:inflateReset(Z)),
{Pid, Ref} = spawn_monitor(
fun() ->
- ?m(?EXIT(not_on_controlling_process), zlib:inflateReset(Z))
+ ?m(?EXIT(not_on_controlling_process), zlib:inflateReset(Z)),
+ Owner ! '$transfer_ownership',
+ receive
+ '$ownership_transferred' ->
+ ?m(ok, zlib:inflateReset(Z))
+ after 200 ->
+ ct:fail("Never received transfer signal.")
+ end
end),
+ ownership_transfer_check(Z, Pid, Ref).
+ownership_transfer_check(Z, WorkerPid, Ref) ->
receive
- {'DOWN', Ref, process, Pid, _Reason} ->
- ok
+ '$transfer_ownership' ->
+ zlib:set_controlling_process(Z, WorkerPid),
+ WorkerPid ! '$ownership_transferred',
+ ownership_transfer_check(Z, WorkerPid, Ref);
+ {'DOWN', Ref, process, WorkerPid, normal} ->
+ ok;
+ {'DOWN', Ref, process, WorkerPid, Reason} ->
+ ct:fail("Spawned worker crashed with reason ~p.", [Reason])
after 200 ->
ct:fail("Spawned worker timed out.")
- end,
-
- ?m(ok, zlib:inflateReset(Z)).
+ end.
sub_heap_binaries(Config) when is_list(Config) ->
Compressed = zlib:compress(<<"gurka">>),
--
cgit v1.2.3
From 5a1131d8c73fa9f5bfb23e7bdf5f406ccd2a1b54 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Fri, 13 Oct 2017 16:26:23 +0200
Subject: Fix speling error 'sndbuf' -> 'recbuf'
---
lib/snmp/src/manager/snmpm_net_if.erl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'lib')
diff --git a/lib/snmp/src/manager/snmpm_net_if.erl b/lib/snmp/src/manager/snmpm_net_if.erl
index 93c987eb0f..29216f9d6a 100644
--- a/lib/snmp/src/manager/snmpm_net_if.erl
+++ b/lib/snmp/src/manager/snmpm_net_if.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2015. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2017. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
@@ -367,7 +367,7 @@ common_socket_opts(Opts) ->
default ->
[];
Sz ->
- [{sndbuf, Sz}]
+ [{recbuf, Sz}]
end ++
case get_opt(Opts, no_reuse, false) of
false ->
--
cgit v1.2.3
From 87aa53c75c04031be99ebca3f47ec8238fa31c2a Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Fri, 13 Oct 2017 17:04:30 +0200
Subject: Update appup for ERIERL-14684
---
lib/diameter/src/diameter.appup.src | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
(limited to 'lib')
diff --git a/lib/diameter/src/diameter.appup.src b/lib/diameter/src/diameter.appup.src
index c2198de9ea..d0e58e8410 100644
--- a/lib/diameter/src/diameter.appup.src
+++ b/lib/diameter/src/diameter.appup.src
@@ -54,7 +54,9 @@
{"1.12.1", [{restart_application, diameter}]}, %% 19.1
{"1.12.2", [{restart_application, diameter}]}, %% 19.3
{"2.0", [{restart_application, diameter}]}, %% 20.0
- {"2.1", [{update, diameter_reg, {advanced, "2.1"}}]} %% 20.1
+ {"2.1", [{load_module, diameter_gen}, %% 20.1
+ {update, diameter_reg, {advanced, "2.1"}}]},
+ {"2.1.1", [{load_module, diameter_gen}]}
],
[
{"0.9", [{restart_application, diameter}]},
@@ -90,6 +92,7 @@
{"1.12.1", [{restart_application, diameter}]},
{"1.12.2", [{restart_application, diameter}]},
{"2.0", [{restart_application, diameter}]},
- {"2.1", [{restart_application, diameter}]}
+ {"2.1", [{restart_application, diameter}]},
+ {"2.1.1", [{load_module, diameter_gen}]}
]
}.
--
cgit v1.2.3
From 67f7217427d2465eb72e5cd61a6fb1ff8dc55f14 Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Fri, 13 Oct 2017 17:05:30 +0200
Subject: vsn -> 2.1.2
---
lib/diameter/vsn.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'lib')
diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk
index f73f68da0b..bfb260ed8f 100644
--- a/lib/diameter/vsn.mk
+++ b/lib/diameter/vsn.mk
@@ -17,5 +17,5 @@
# %CopyrightEnd%
APPLICATION = diameter
-DIAMETER_VSN = 2.1.1
+DIAMETER_VSN = 2.1.2
APP_VSN = $(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)
--
cgit v1.2.3
From d2e0866cd6a734b046672f862b73970bd5a9a27e Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Fri, 13 Oct 2017 15:47:14 +0200
Subject: Fix faulty recursion
The wrong variable was passed into the decode recursion, causing the
options map to be contaminated by strict_mbit and failed_avp
modifications that should only apply to component AVPs in the Grouped
case. Decode errors and M-bits could be ignored as a result.
---
lib/diameter/src/base/diameter_gen.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'lib')
diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl
index d3b9f704fe..3d7d443fd4 100644
--- a/lib/diameter/src/base/diameter_gen.erl
+++ b/lib/diameter/src/base/diameter_gen.erl
@@ -320,7 +320,7 @@ decode(Bin, Code, Vid, DataLen, Pad, M, P, Name, Mod, Fmt, Strict, Opts0,
index = Idx},
Dec = dec(Data, Name, NameT, Mod, Fmt, Opts, Avp),
- Acc = decode(T, Name, Mod, Fmt, Strict, Opts, Idx+1, AM),%% recurse
+ Acc = decode(T, Name, Mod, Fmt, Strict, Opts0, Idx+1, AM),%% recurse
acc(Acc, Dec, I, Field, Arity, Strict, Mod, Opts);
_ ->
{NameT, _Field, _Arity, {_, AM}}
--
cgit v1.2.3
From f9dab31aa65ee08d5d550d09bdf81d0c5744eb8d Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Fri, 13 Oct 2017 16:49:33 +0200
Subject: Remove unused function arguments
Which may have been used in the past, but aren't now.
---
lib/diameter/src/base/diameter_gen.erl | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
(limited to 'lib')
diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl
index 3d7d443fd4..d0142c568d 100644
--- a/lib/diameter/src/base/diameter_gen.erl
+++ b/lib/diameter/src/base/diameter_gen.erl
@@ -321,7 +321,7 @@ decode(Bin, Code, Vid, DataLen, Pad, M, P, Name, Mod, Fmt, Strict, Opts0,
Dec = dec(Data, Name, NameT, Mod, Fmt, Opts, Avp),
Acc = decode(T, Name, Mod, Fmt, Strict, Opts0, Idx+1, AM),%% recurse
- acc(Acc, Dec, I, Field, Arity, Strict, Mod, Opts);
+ acc(Acc, Dec, I, Field, Arity, Strict, Mod);
_ ->
{NameT, _Field, _Arity, {_, AM}}
= incr(Name, Code, Vid, M, Mod, Strict, Opts0, AM0),
@@ -680,30 +680,30 @@ set_failed('Failed-AVP', #{failed_avp := false} = Opts) ->
set_failed(_, Opts) ->
Opts.
-%% acc/8
+%% acc/7
-acc([AM | Acc], As, I, Field, Arity, Strict, Mod, Opts) ->
- [AM | acc1(Acc, As, I, Field, Arity, Strict, Mod, Opts)].
+acc([AM | Acc], As, I, Field, Arity, Strict, Mod) ->
+ [AM | acc1(Acc, As, I, Field, Arity, Strict, Mod)].
-%% acc1/8
+%% acc1/7
%% Faulty AVP, not grouped.
-acc1(Acc, {_RC, Avp} = E, _, _, _, _, _, _) ->
+acc1(Acc, {_RC, Avp} = E, _, _, _, _, _) ->
[Avps, Failed | Rec] = Acc,
[[Avp | Avps], [E | Failed] | Rec];
%% Faulty component in grouped AVP.
-acc1(Acc, {RC, As, Avp}, _, _, _, _, _, _) ->
+acc1(Acc, {RC, As, Avp}, _, _, _, _, _) ->
[Avps, Failed | Rec] = Acc,
[[As | Avps], [{RC, Avp} | Failed] | Rec];
%% Grouped AVP ...
-acc1([Avps | Acc], [Avp|_] = As, I, Field, Arity, Strict, Mod, Opts) ->
- [[As|Avps] | acc2(Acc, Avp, I, Field, Arity, Strict, Mod, Opts)];
+acc1([Avps | Acc], [Avp|_] = As, I, Field, Arity, Strict, Mod) ->
+ [[As|Avps] | acc2(Acc, Avp, I, Field, Arity, Strict, Mod)];
%% ... or not.
-acc1([Avps | Acc], Avp, I, Field, Arity, Strict, Mod, Opts) ->
- [[Avp|Avps] | acc2(Acc, Avp, I, Field, Arity, Strict, Mod, Opts)].
+acc1([Avps | Acc], Avp, I, Field, Arity, Strict, Mod) ->
+ [[Avp|Avps] | acc2(Acc, Avp, I, Field, Arity, Strict, Mod)].
%% The component list of a Grouped AVP is discarded when packing into
%% the record (or equivalent): the values in an 'AVP' field are
@@ -713,24 +713,24 @@ acc1([Avps | Acc], Avp, I, Field, Arity, Strict, Mod, Opts) ->
%% retain the same structure as in diameter_packet.avps, but an 'AVP'
%% list has always been flat.
-%% acc2/8
+%% acc2/7
%% No errors, but nowhere to pack.
-acc2(Acc, Avp, _, 'AVP', 0, _, _, _) ->
+acc2(Acc, Avp, _, 'AVP', 0, _, _) ->
[Failed | Rec] = Acc,
[[{rc(Avp), Avp} | Failed] | Rec];
%% Relaxed arities.
-acc2(Acc, Avp, _, Field, Arity, Strict, Mod, _)
+acc2(Acc, Avp, _, Field, Arity, Strict, Mod)
when Strict /= decode ->
pack(Arity, Field, Avp, Mod, Acc);
%% No maximum arity.
-acc2(Acc, Avp, _, Field, {_,'*'} = Arity, _, Mod, _) ->
+acc2(Acc, Avp, _, Field, {_,'*'} = Arity, _, Mod) ->
pack(Arity, Field, Avp, Mod, Acc);
%% Or check.
-acc2(Acc, Avp, I, Field, Arity, _, Mod, _) ->
+acc2(Acc, Avp, I, Field, Arity, _, Mod) ->
Mx = max_arity(Arity),
if Mx =< I ->
[Failed | Rec] = Acc,
--
cgit v1.2.3
From db59b2076a49ae31c7ba03dd0e4f248a48c7e9b1 Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Sat, 14 Oct 2017 12:56:45 +0200
Subject: Fix error handling when decoding an AVP with an alternate dictionary
The options map wasn't updated after the AVP was identified, with
the resulting consequences for M-bit interpretation.
---
lib/diameter/src/base/diameter_gen.erl | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
(limited to 'lib')
diff --git a/lib/diameter/src/base/diameter_gen.erl b/lib/diameter/src/base/diameter_gen.erl
index d0142c568d..93ebe57685 100644
--- a/lib/diameter/src/base/diameter_gen.erl
+++ b/lib/diameter/src/base/diameter_gen.erl
@@ -574,15 +574,17 @@ dec_AVP(Dicts, Data, Name, Mod, Fmt, Opts, #diameter_avp{code = Code,
%% Try to decode an AVP in the first alternate dictionary that defines
%% it.
-dec_AVP([Dict | Rest], Data, Name, Mod, Fmt, Opts, Code, Vid, Avp) ->
+dec_AVP([Dict | Rest], Data, Name, Mod, Fmt, Opts0, Code, Vid, Avp) ->
case Dict:avp_name(Code, Vid) of
- {AvpName, Type} ->
+ {AvpName, Type} = NameT ->
A = Avp#diameter_avp{name = AvpName,
type = Type},
- #{failed_avp := Failed} = Opts,
+ #{failed_avp := Failed}
+ = Opts
+ = setopts(NameT, Name, Avp#diameter_avp.is_mandatory, Opts0),
dec(Data, Name, AvpName, Type, Mod, Dict, Fmt, Failed, Opts, A);
_ ->
- dec_AVP(Rest, Data, Name, Mod, Fmt, Opts, Code, Vid, Avp)
+ dec_AVP(Rest, Data, Name, Mod, Fmt, Opts0, Code, Vid, Avp)
end;
dec_AVP([], _, _, _, _, _, _, _, Avp) ->
--
cgit v1.2.3
From 1a4762bf01cd3601ff6d48d7d5f59defb5755033 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen
Date: Mon, 16 Oct 2017 10:22:47 +0200
Subject: Update version
---
lib/snmp/src/app/snmp.appup.src | 26 --------------------------
lib/snmp/vsn.mk | 2 +-
2 files changed, 1 insertion(+), 27 deletions(-)
(limited to 'lib')
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index bde637744c..ca61782639 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -8,19 +8,6 @@
%% {update, snmpa_local_db, soft, soft_purge, soft_purge, []}
%% {add_module, snmpm_net_if_mt}
[
- {<<"5\\.2\\.6">>,
- [{load_module, snmpc, soft_purge, soft_purge, []},
- {load_module, snmpc_lib, soft_purge, soft_purge, []}]},
- {<<"5\\.2\\.5">>,
- [{load_module, snmpc, soft_purge, soft_purge, []},
- {load_module, snmpc_lib, soft_purge, soft_purge, []},
- {load_module, snmp_generic, soft_purge, soft_purge, []}]},
- {<<"5\\.2\\.4">>,
- [{load_module, snmpc, soft_purge, soft_purge, []},
- {load_module, snmp_generic, soft_purge, soft_purge, []},
- {load_module, snmp, soft_purge, soft_purge, []},
- {load_module, snmpc_lib, soft_purge, soft_purge, []},
- {load_module, snmpc_mib_gram, soft_purge, soft_purge, []}]},
{<<"5\\..*">>, [{restart_application, snmp}]},
{<<"4\\..*">>, [{restart_application, snmp}]}
],
@@ -30,19 +17,6 @@
%% {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
[
- {<<"5\\.2\\.6">>,
- [{load_module, snmpc, soft_purge, soft_purge, []},
- {load_module, snmpc_lib, soft_purge, soft_purge, []}]},
- {<<"5\\.2\\.5">>,
- [{load_module, snmpc, soft_purge, soft_purge, []},
- {load_module, snmpc_lib, soft_purge, soft_purge, []},
- {load_module, snmp_generic, soft_purge, soft_purge, []}]},
- {<<"5\\.2\\.4">>,
- [{load_module, snmpc, soft_purge, soft_purge, []},
- {load_module, snmp_generic, soft_purge, soft_purge, []},
- {load_module, snmp, soft_purge, soft_purge, []},
- {load_module, snmpc_lib, soft_purge, soft_purge, []},
- {load_module, snmpc_mib_gram, soft_purge, soft_purge, []}]},
{<<"5\\..*">>, [{restart_application, snmp}]},
{<<"4\\..*">>, [{restart_application, snmp}]}
]
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index 207f0084d8..ef48608bda 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -19,6 +19,6 @@
# %CopyrightEnd%
APPLICATION = snmp
-SNMP_VSN = 5.2.7
+SNMP_VSN = 5.2.8
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)"
--
cgit v1.2.3
From ecfa7567476ccf38c7987f0ee0eaa5987c9695f5 Mon Sep 17 00:00:00 2001
From: Erlang/OTP
Date: Wed, 25 Oct 2017 08:08:01 +0200
Subject: Update release notes
---
lib/diameter/doc/src/notes.xml | 17 +++++++++++++++++
lib/snmp/doc/src/notes.xml | 18 +++++++++++++++++-
2 files changed, 34 insertions(+), 1 deletion(-)
(limited to 'lib')
diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml
index 589e7d5145..eded788419 100644
--- a/lib/diameter/doc/src/notes.xml
+++ b/lib/diameter/doc/src/notes.xml
@@ -43,6 +43,23 @@ first.
+diameter 2.1.2
+
+ Fixed Bugs and Malfunctions
+
+ -
+
+ A fault introduced in diameter 2.1 could cause decode
+ errors to be ignored in AVPs following the header of a
+ Grouped AVP.
+
+ Own Id: OTP-14684 Aux Id: ERIERL-85
+
+
+
+
+
+
diameter 2.1.1
Fixed Bugs and Malfunctions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index e8527ded93..5cd20bad87 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -34,7 +34,23 @@
- SNMP 5.2.7
+ SNMP 5.2.8
+
+ Fixed Bugs and Malfunctions
+
+ -
+
+ The recbuf configuration option was not propagated
+ correctly to the socket for the SNMP Manager.
+
+ Own Id: OTP-13372 Aux Id: ERIERL-73
+
+
+
+
+
+
+SNMP 5.2.7
Fixed Bugs and Malfunctions
--
cgit v1.2.3