Blame otp-0011-Respect-proto_dist-switch-while-connection-to-EPMD.patch

f86639
From: Peter Lemenkov <lemenkov@gmail.com>
f86639
Date: Thu, 14 Jul 2016 17:51:16 +0300
f86639
Subject: [PATCH] Respect -proto_dist switch while connection to EPMD
f86639
f86639
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
f86639
f86639
diff --git a/lib/kernel/src/erl_epmd.erl b/lib/kernel/src/erl_epmd.erl
f86639
index c6202dd..ec2e330 100644
f86639
--- a/lib/kernel/src/erl_epmd.erl
f86639
+++ b/lib/kernel/src/erl_epmd.erl
f86639
@@ -103,6 +103,10 @@ names(EpmdAddr) ->
f86639
 
f86639
 register_node(Name, PortNo) ->
f86639
     register_node(Name, PortNo, inet).
f86639
+register_node(Name, PortNo, inet_tcp) ->
f86639
+    register_node(Name, PortNo, inet);
f86639
+register_node(Name, PortNo, inet6_tcp) ->
f86639
+    register_node(Name, PortNo, inet6);
f86639
 register_node(Name, PortNo, Family) ->
f86639
     gen_server:call(erl_epmd, {register, Name, PortNo, Family}, infinity).
f86639
 
f86639
diff --git a/lib/kernel/src/inet_tcp_dist.erl b/lib/kernel/src/inet_tcp_dist.erl
f86639
index 64b28bb..ffbd5d5 100644
f86639
--- a/lib/kernel/src/inet_tcp_dist.erl
f86639
+++ b/lib/kernel/src/inet_tcp_dist.erl
f86639
@@ -73,7 +73,7 @@ gen_listen(Driver, Name) ->
f86639
 	{ok, Socket} ->
f86639
 	    TcpAddress = get_tcp_address(Driver, Socket),
f86639
 	    {_,Port} = TcpAddress#net_address.address,
f86639
-	    case erl_epmd:register_node(Name, Port) of
f86639
+	    case erl_epmd:register_node(Name, Port, Driver) of
f86639
 		{ok, Creation} ->
f86639
 		    {ok, {Socket, TcpAddress, Creation}};
f86639
 		Error ->