* Re: [Comm] XDMCP
2013-11-02 17:45 [Comm] XDMCP Roman Savochenko
@ 2013-11-05 8:26 ` Michael Shigorin
0 siblings, 0 replies; 2+ messages in thread
From: Michael Shigorin @ 2013-11-05 8:26 UTC (permalink / raw)
To: community
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
On Sat, Nov 02, 2013 at 07:45:43PM +0200, Roman Savochenko wrote:
> XDMCP warning: INET6 UDP socket creation failed
> Из исходников вроде видно, что если IPV6 определён,
> то остальное он даже не смотрит!
Возможно, следует откатить эти или подобные им патчи.
--
---- WBR, Michael Shigorin / http://altlinux.org
------ http://opennet.ru / http://anna-news.info
[-- Attachment #2: 01_gdmchooser-ipv6_bindv6only-workaround.patch --]
[-- Type: text/plain, Size: 893 bytes --]
Debian #562126; enable gdmchooser to work with netbase default setting
net.ipv6.bindv6only=1
diff -Naur gdm-2.20.10/gui/gdmchooser.c gdm-2.20.10/gui/gdmchooser.c
--- gdm-2.20.10/gui/gdmchooser.c 2009-03-19 00:29:11.000000000 -0430
+++ gdm-2.20.10/gui/gdmchooser.c 2010-02-09 20:10:08.000000000 -0430
@@ -1121,6 +1121,7 @@
{
static XdmcpHeader header;
gint sockopts = 1;
+ int ipv6_only_flag = 0;
/* Open socket for communication */
#ifdef ENABLE_IPV6
@@ -1140,6 +1141,13 @@
gdm_common_fail_exit ("Could not set socket options!");
}
+ if (have_ipv6) {
+ if (setsockopt (sockfd, IPPROTO_IPV6, IPV6_V6ONLY,
+ (char*)&ipv6_only_flag, sizeof(ipv6_only_flag)) < 0) {
+ gdm_common_fail_exit ("Could not set socket options!");
+ }
+ }
+
/* Assemble XDMCP BROADCAST_QUERY packet in static buffer */
header.opcode = (CARD16) BROADCAST_QUERY;
header.length = 1;
[-- Attachment #3: 02_xdmcp-ipv6_bindv6only.patch --]
[-- Type: text/plain, Size: 899 bytes --]
Debian #563406
Index: gdm-2.20.10/daemon/gdm-xdmcp-manager.c
===================================================================
--- gdm-2.20.10.orig/daemon/gdm-xdmcp-manager.c 2010-02-28 13:57:47.685002928 +0100
+++ gdm-2.20.10/daemon/gdm-xdmcp-manager.c 2010-02-28 14:01:54.697504018 +0100
@@ -398,6 +398,7 @@ static int
create_socket (struct addrinfo *ai)
{
int sock;
+ int zero = 0;
sock = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (sock < 0) {
@@ -405,6 +406,14 @@ create_socket (struct addrinfo *ai)
return sock;
}
+ if (ai->ai_family == AF_INET6) {
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof zero) < 0) {
+ gdm_error("setsockopt(IPV6_V6ONLY): %s\n", g_strerror(errno));
+ close(sock);
+ return -1;
+ }
+ }
+
if (bind (sock, ai->ai_addr, ai->ai_addrlen) < 0) {
gdm_error ("bind: %s", g_strerror (errno));
close (sock);
^ permalink raw reply [flat|nested] 2+ messages in thread