[erlang-patches] [PATCH] epmd: support IPv6 node registration
Michael Santos
michael.santos@REDACTED
Fri May 3 16:32:37 CEST 2013
On Fri, May 03, 2013 at 04:04:13PM +0200, Fredrik wrote:
> On 05/03/2013 03:44 PM, Fredrik wrote:
> >On 05/03/2013 03:27 PM, Michael Santos wrote:
> >>On Wed, Feb 20, 2013 at 07:55:17AM -0500, Michael Santos wrote:
> >>>Allow IPv6 nodes to register with and query epmd. On systems with
> >>>IPv6 support:
> >>>
> >>>* epmd listens on both the IPv4 and IPv6 ANY or loopback sockets
> >>>
> >>>* the epmd cli client connects to epmd over the IPv6 loopback
> >>>
> >>>* distributed nodes started with "-proto_dist inet6_tcp" will register
> >>> with epmd over IPv6
> >>>
> >>>The interaction between IPv4 and IPv6 sockets depends on the platform:
> >>>
> >>>* FreeBSD allows multiple "specific" sockets to bind the same
> >>>port (such
> >>> as 2 sockets listening to the same port on ANY and the loopback).
> >>> Binding port 4369 to IPv4 and IPv6 sockets simulataneously
> >>>is allowed.
> >>>
> >>>* Linux does not allow the same port to be bound by different sockets.
> >>> Setting the IPV6_V6ONLY socket option is required.
> >>>
> >>>* Windows
> >>>
> >>> The behaviour differs depending on the version of Windows:
> >>>
> >>>http://msdn.microsoft.com/en-us/library/windows/desktop/bb513665(v=vs.85).aspx
> >>>
> >>> According to the site, sockets on Windows XP with Service
> >>>Pack 1 (SP1)
> >>> and Windows Server 2003 will only listen on either IPv4 or IPv6, so
> >>> creating two sockets is required to service IPv4 and IPv6 traffic on
> >>> the same port. The IPV6_V6ONLY socket option is not supported.
> >>>
> >>> For Windows Vista and later, a single socket can handle
> >>>IPv4 and IPv6
> >>> traffic for the same port. The IPV6_V6ONLY socket option is
> >>>supported
> >>> and is enabled for IPv6 sockets by default.
> >>>---
> >>> erts/doc/src/epmd.xml | 2 +-
> >>> erts/doc/src/erl.xml | 22 +++++
> >>> erts/epmd/src/epmd.c | 6 +-
> >>> erts/epmd/src/epmd_cli.c | 11 ++-
> >>> erts/epmd/src/epmd_int.h | 63 +++++++++----
> >>> erts/epmd/src/epmd_srv.c | 184
> >>>+++++++++++++++++++++++++------------
> >>> erts/epmd/test/epmd_SUITE.erl | 33 ++++++-
> >>> lib/kernel/src/erl_epmd.erl | 18 ++--
> >>> lib/kernel/src/inet6_tcp_dist.erl | 2 +-
> >>> 9 files changed, 248 insertions(+), 93 deletions(-)
> >>ping!
> >>_______________________________________________
> >>erlang-patches mailing list
> >>erlang-patches@REDACTED
> >>http://erlang.org/mailman/listinfo/erlang-patches
> >I thought that I've already mailed you back regarding this patch.
> >But now I don't seem to remember what I wanted you to do about it.
> >I will run it in 'pu' builds over the weekend. If it turns out OK
> >it will be reviewed.
> >
> Ok,
> Found out what I was suppose to mail you about:
> It does not build on windows;
>
> epmd_srv.o : error LNK2019: unresolved external symbol IN6_ARE_ADDR_EQUAL referenced in function conn_local_peer_check
> epmd_srv.o : error LNK2019: unresolved external symbol IN6_IS_ADDR_LOOPBACK referenced in function conn_local_peer_check
> ****/bin/win32/epmd.exe : fatal error LNK1120: 2 unresolved externals
I *think* the last version of the patch fixes the link error on Windows
(haven't tested it). It sets the Windows version as suggested by Patrik
Nyblom.
Sorry for the confusion. I can re-send the patch or I can post it to
github.
More information about the erlang-patches
mailing list