From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Tue, 5 Nov 2013 10:26:46 +0200 From: Michael Shigorin To: community@lists.altlinux.org Message-ID: <20131105082646.GI4228@osdn.org.ua> Mail-Followup-To: community@lists.altlinux.org References: <52753A47.1070309@diyaorg.dp.ua> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <52753A47.1070309@diyaorg.dp.ua> User-Agent: Mutt/1.4.2.1i Subject: Re: [Comm] XDMCP X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: mike@altlinux.org, ALT Linux Community general discussions List-Id: ALT Linux Community general discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Nov 2013 08:26:52 -0000 Archived-At: List-Archive: List-Post: --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="01_gdmchooser-ipv6_bindv6only-workaround.patch" 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; --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="02_xdmcp-ipv6_bindv6only.patch" 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); --qMm9M+Fa2AknHoGS--