Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Mar 2011 11:09:28 +1100 (EST)
From:      Peter Jeremy <peterjeremy@acm.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/155683: x11/xdm [patch] Enabling IPv6 support breaks IPv4
Message-ID:  <201103190009.p2J09SVi004462@server.vk2pj.dyndns.org>
Resent-Message-ID: <201103190010.p2J0AAU0033565@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         155683
>Category:       ports
>Synopsis:       x11/xdm [patch] Enabling IPv6 support breaks IPv4
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 19 00:10:10 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
n/a
>Environment:
System: FreeBSD server.vk2pj.dyndns.org 8.2-STABLE FreeBSD 8.2-STABLE #9: Sun Feb 27 17:46:10 EST 2011 root@server.vk2pj.dyndns.org:/var/obj/usr/src/sys/server amd64
	xdm-1.1.8_3

>Description:
	If the xdm configure script detects IPv6 support is available,
	it will build a version of xdm that supports xdmcp over IPv6.
	Unfortunately, due to a long outstanding bug (google shows
	references back to 2006), xdm then no longer supports IPv4.

>How-To-Repeat:
	Given two hosts A and B, both running a "generic" world (ie no
	"WITHOUT_INET6" or similar) with xorg and having only IPv4
	addresses on physical networks:

	On host A, comment out the line "DisplayManager.requestPort: 0" in
	in /usr/local/lib/X11/xdm/xdm-config, add B's FQDN to
	 /usr/local/lib/X11/xdm/Xaccess and [re]start xdm.  Use
	lsof or similar to show that xdm is listening on UDP6:177

	On host B, start X with the options '-nolisten inet6 -query A'.

	Use tcpdump or similar to show that X on host B is sending
	xdmcp packets to UDP:177 on host A and receiving ICMP port
	unreachable packets back.

>Fix:
	The correct fix is to change xdm to simultaneously handle both
	IPv4 and IPv6 xdmcp requests.  I haven't been able to find
	suitable code on the net.

	As a work-around, I suggest the following patch to the port
	Makefile to make IPv6 optional (defaulting to off).

Index: Makefile
===================================================================
RCS file: /usr/ncvs/ports/x11/xdm/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	25 Feb 2011 16:52:19 -0000	1.10
+++ Makefile	18 Mar 2011 23:37:48 -0000
@@ -18,6 +18,14 @@
 CONFIGURE_ARGS+=	--with-xdmconfigdir=${EXAMPLESDIR} \
 			--with-xdmscriptdir=${EXAMPLESDIR}
 
+OPTIONS=	IPV6	"Enable IPv6 support (breaks IPv4)."	Off
+
+.include <bsd.port.options.mk>
+
+.if defined(WITHOUT_IPV6)
+CONFIGURE_ARGS+=	--disable-ipv6
+.endif
+
 MAN1=		xdm.1
 
 CFFILES=	GiveConsole TakeConsole Xaccess Xreset Xresources \
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103190009.p2J09SVi004462>