File 0617-kernel-test-IPV6-adjustments.patch of Package erlang

From f972ddc263b95346ba88aca171d59f1ee2adfa69 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Mon, 18 Mar 2019 17:13:08 +0100
Subject: [PATCH] [kernel|test] IPV6 adjustments

---
 lib/kernel/test/gen_sctp_SUITE.erl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl
index a0ae792ba9..e4c489bd10 100644
--- a/lib/kernel/test/gen_sctp_SUITE.erl
+++ b/lib/kernel/test/gen_sctp_SUITE.erl
@@ -1459,11 +1459,11 @@ do_open_and_connect(ServerAddresses, AddressToConnectTo) ->
     do_open_and_connect(ServerAddresses, AddressToConnectTo, Fun).
 %%
 do_open_and_connect(ServerAddresses, AddressToConnectTo, Fun) ->
-    ServerFamily = get_family_by_addrs(ServerAddresses),
+    {ServerFamily, ServerOpts} = get_family_by_addrs(ServerAddresses),
     io:format("Serving ~p addresses: ~p~n",
 	      [ServerFamily, ServerAddresses]),
     S1 = ok(gen_sctp:open(0, [{ip,Addr} || Addr <- ServerAddresses] ++
-			      [ServerFamily])),
+			      [ServerFamily|ServerOpts])),
     ok = gen_sctp:listen(S1, true),
     P1 = ok(inet:port(S1)),
     ClientFamily = get_family_by_addr(AddressToConnectTo),
@@ -1493,9 +1493,9 @@ do_open_and_connect(ServerAddresses, AddressToConnectTo, Fun) ->
 %% If at least one of the addresses is an ipv6 address, return inet6, else inet.
 get_family_by_addrs(Addresses) ->
     case lists:usort([get_family_by_addr(Addr) || Addr <- Addresses]) of
-	[inet, inet6] -> inet6;
-	[inet]        -> inet;
-	[inet6]       -> inet6
+	[inet, inet6] -> {inet6, [{ipv6_v6only, false}]};
+	[inet]        -> {inet,  []};
+	[inet6]       -> {inet6, []}
     end.
 
 get_family_by_addr(Addr) when tuple_size(Addr) =:= 4 -> inet;
-- 
2.16.4