aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-03-21 11:13:26 +0100
committerMicael Karlberg <[email protected]>2019-03-21 11:13:26 +0100
commit4b550bb3dd326bde53e4088f41f7affc1ff04ab4 (patch)
tree77d744d0853672c7b5383b0d34e49775790346ec /lib
parent10d1e62616c1639db037f1d5b4dfaa6c035f886d (diff)
parentf972ddc263b95346ba88aca171d59f1ee2adfa69 (diff)
downloadotp-4b550bb3dd326bde53e4088f41f7affc1ff04ab4.tar.gz
otp-4b550bb3dd326bde53e4088f41f7affc1ff04ab4.tar.bz2
otp-4b550bb3dd326bde53e4088f41f7affc1ff04ab4.zip
Merge branch 'bmk/20190318/gen_sctp_ipv6_adjustments'
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/test/gen_sctp_SUITE.erl10
1 files 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;