This allows ipv4 connections mapped to ipv6, in case the system default is backwards.
Signed-off-by: Julien Cristau <[email protected]> --- socket.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/socket.c b/socket.c index 7e678ad..8cd9d69 100644 --- a/socket.c +++ b/socket.c @@ -175,6 +175,17 @@ CreateListeningSocket (struct sockaddr *sock_addr, int salen) } RegisterCloseOnFork (fd); +# if defined(IPv6) && defined(IPV6_V6ONLY) + if (sock_addr->sa_family == AF_INET6) + int zero = 0; + if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof zero) < 0) { + LogError ("Could not disable V6ONLY on XDMCP socket: %s\n", + _SysErrorMsg (errno)); + } + } +# endif + if (bind (fd, sock_addr, salen) == -1) { LogError ("error binding socket address %d: %s\n", request_port, -- 1.7.0 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
