ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: community@lists.altlinux.org
Subject: Re: [Comm] XDMCP
Date: Tue, 5 Nov 2013 10:26:46 +0200
Message-ID: <20131105082646.GI4228@osdn.org.ua> (raw)
In-Reply-To: <52753A47.1070309@diyaorg.dp.ua>

[-- 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);

      reply	other threads:[~2013-11-05  8:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 17:45 Roman Savochenko
2013-11-05  8:26 ` Michael Shigorin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131105082646.GI4228@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=community@lists.altlinux.org \
    --cc=mike@altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git