aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorJohn-Mark Bell <[email protected]>2010-03-23 11:46:10 +0000
committerJohn-Mark Bell <[email protected]>2010-03-23 11:46:10 +0000
commit3c1f8435a9032667e207d92d21777612e15e6528 (patch)
treead85f2f47db683869c8392c56b4ce2d945b0b4fc /lib/kernel
parentb39b8b7f41b3420c77757845f66e2c567e1c5b40 (diff)
downloadotp-3c1f8435a9032667e207d92d21777612e15e6528.tar.gz
otp-3c1f8435a9032667e207d92d21777612e15e6528.tar.bz2
otp-3c1f8435a9032667e207d92d21777612e15e6528.zip
Fix implementation of IPv6 TCP distribution protocol
TCP distribution over IPv6 did not work. The TCP socket was forcibly closed before any communication could take place. The following changes resolve this: * Make the kernel use the inet6 variant of accept. * Use inet6 variants of TCP socket functions. * Ensure that the inet6 address family is used in all cases.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/inet6_tcp_dist.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/kernel/src/inet6_tcp_dist.erl b/lib/kernel/src/inet6_tcp_dist.erl
index 34cf582af7..097cadf8d4 100644
--- a/lib/kernel/src/inet6_tcp_dist.erl
+++ b/lib/kernel/src/inet6_tcp_dist.erl
@@ -87,7 +87,7 @@ accept(Listen) ->
accept_loop(Kernel, Listen) ->
case inet6_tcp:accept(Listen) of
{ok, Socket} ->
- Kernel ! {accept,self(),Socket,inet,tcp},
+ Kernel ! {accept,self(),Socket,inet6,tcp},
controller(Kernel, Socket),
accept_loop(Kernel, Listen);
Error ->
@@ -236,8 +236,8 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) ->
timer = Timer,
this_flags = 0,
other_version = Version,
- f_send = fun inet_tcp:send/2,
- f_recv = fun inet_tcp:recv/3,
+ f_send = fun inet6_tcp:send/2,
+ f_recv = fun inet6_tcp:recv/3,
f_setopts_pre_nodeup =
fun(S) ->
inet:setopts
@@ -262,7 +262,7 @@ do_setup(Kernel, Node, Type, MyNode, LongOrShortNames,SetupTime) ->
address = {Ip,TcpPort},
host = Address,
protocol = tcp,
- family = inet}
+ family = inet6}
end,
mf_tick = fun ?MODULE:tick/1,
mf_getstat = fun ?MODULE:getstat/1,