Subject: Re: IPv6-enabled XFree86 4.4.0 with IPv4-only kernel
To: None <devel@XFree86.Org, tech-x11@NetBSD.org>
From: David Dawes <dawes@XFree86.Org>
List: tech-x11
Date: 01/08/2004 18:36:18
--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Thu, Jan 08, 2004 at 03:39:37PM -0500, David Dawes wrote:
>On Thu, Jan 08, 2004 at 09:11:59PM +0100, Martin MOKREJS wrote:
>>On Thu, 8 Jan 2004, David Dawes wrote:
>>
>>> On Fri, Jan 09, 2004 at 03:09:50AM +0900, Bang Jun-Young wrote:
>>> >[CC'ed to devel@xfree86.org as well]
>>> >
>>> >On Thu, Jan 08, 2004 at 08:44:09AM +0100, Matthieu Herrb wrote:
>>> >>
>>> >> On 8 Jan 2004, at 02:38, Bang Jun-Young wrote:
>>> >>
>>> >> >Hi,
>>> >> >
>>> >> >While I'm testing XFree86 4.4.0RCx releases recently, I can't find
>>> >> >how to make IPv6-enabled XFree86 work with a IPv4-only kernel.
>>> >>
>>> >> What kind of errors/failures are you experiencing ?
>>> >> I've run the IPv6 enabled XFree86 on machines with v4 only kernels
>>> >> without problems.
>>> >
>>> >The error message is as follows:
>>> >
>>> >_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
>>> >_XSERVTransOpen: transport open failed for inet6/krishna.mogua.com:0
>>> >_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
>>> >
>>> >Fatal server error:
>>> >Failed to establish all listening sockets
>>>
>>> You need to include -DPART_NET in your ServerOsDefines. This makes
>>> things like that non-fatal. XFree86 servers build with this option
>>> by default.
>>
>>I had the same problem on my Gentoo Linux box, I "fixed" that by enabling
>>IPv6 in kernel. i just want to point out the flags should get into the
>>mainstream distribution, or I'm desperate users who missed that critical
>>requirement in RELNOTES .... :)
>
>Did you get a fatal error, or just a (harmless) warning message?
>Like I said, for a default build of the XFree86 servers, this would
>just be a non-fatal warning.
I need to make a correction to that. While I could have sworn that it was
the default on all platforms, it is only the default on a few platforms
(including Linux though).
I think it should be the default everywhere. Something like the attached
patch (relative to the current CVS trunk) would do it.
David
--
David Dawes
developer/release engineer The XFree86 Project
www.XFree86.org/~dawes
--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pn.diff"
Index: config/cf/gnu.cf
===================================================================
RCS file: /home/x-cvs/xc/config/cf/gnu.cf,v
retrieving revision 1.12
diff -u -r1.12 gnu.cf
--- config/cf/gnu.cf 24 Nov 2003 02:02:26 -0000 1.12
+++ config/cf/gnu.cf 8 Jan 2004 23:27:10 -0000
@@ -127,7 +127,7 @@
XCOMM i386Architecture
#define OptimizedCDebugFlags DefaultGcc2i386Opt
#define GNUMachineDefines -D__i386__
-#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#define HasPlugin YES
#define VendorHasX11R6_3libXext YES
Index: config/cf/kdrive.cf
===================================================================
RCS file: /home/x-cvs/xc/config/cf/kdrive.cf,v
retrieving revision 1.13
diff -u -r1.13 kdrive.cf
--- config/cf/kdrive.cf 21 Dec 2003 05:14:57 -0000 1.13
+++ config/cf/kdrive.cf 8 Jan 2004 23:27:16 -0000
@@ -199,7 +199,7 @@
#undef ServerExtraDefines
#define ServerExtraDefines -DKDRIVESERVER -DGCCUSESGAS -DDDXOSINIT -DSMART_SCHEDULE $(FONTSERVERACCESS) Pseudo8Defines TouchScreenDefines KdriveServerExtraDefines
#undef ServerOSDefines
-#define ServerOSDefines -DDDXOSINIT -DPART_NET
+#define ServerOSDefines -DDDXOSINIT
#ifndef Other IConfigFiles
#define OtherIConfigFile $(IRULESRC)/kdrive.cf
Index: config/cf/linux.cf
===================================================================
RCS file: /home/x-cvs/xc/config/cf/linux.cf,v
retrieving revision 3.220
diff -u -r3.220 linux.cf
--- config/cf/linux.cf 30 Dec 2003 22:38:33 -0000 3.220
+++ config/cf/linux.cf 8 Jan 2004 23:27:37 -0000
@@ -765,7 +765,7 @@
# define OptimizedCDebugFlags DefaultGcc2AxpOpt
# endif
# define LinuxMachineDefines -D__alpha__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT
# ifdef UseCompaqMathLibrary
# define MathLibrary -lcpml -lm
@@ -778,14 +778,14 @@
# define OptimizedCDebugFlags -O3
# endif
# define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* Arm32Achitecture */
#ifdef HPArchitecture
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# define LinuxMachineDefines -D__hppa__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif
@@ -794,7 +794,7 @@
# define OptimizedCDebugFlags DefaultGcc2i386Opt
# endif
# define LinuxMachineDefines -D__i386__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* i386Architecture */
@@ -803,7 +803,7 @@
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__ia64__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* ia64Architecture */
@@ -812,7 +812,7 @@
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__mc68000__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* Mc68020Architecture */
@@ -821,7 +821,7 @@
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__mips__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif
@@ -831,7 +831,7 @@
# define OptimizedCDebugFlags DefaultGcc2PpcOpt
# endif
# define LinuxMachineDefines -D__powerpc__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* PpcArchitecture */
@@ -840,7 +840,7 @@
# define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs
# endif
# define LinuxMachineDefines -D__s390__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* s390Architecture */
@@ -848,7 +848,7 @@
/*#define DefaultCCOptions -fsigned-char */
#define OptimizedCDebugFlags -O3 -fomit-frame-pointer
#define LinuxMachineDefines -D__s390x__
-#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* s390xArchitecture */
@@ -857,7 +857,7 @@
# define OptimizedCDebugFlags -O2 GccAliasingArgs
# endif
# define LinuxMachineDefines -D__sparc__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
# define AsVISOption -Av9a
# ifdef Sparc64Architecture
@@ -888,7 +888,7 @@
# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs
# endif
# define LinuxMachineDefines -D__sh__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
# ifndef DoLoadableServer
# define DoLoadableServer NO
@@ -900,7 +900,7 @@
# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
# endif
# define LinuxMachineDefines -D__AMD64__
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* AMD64Architecture */
Index: config/cf/lynx.cf
===================================================================
RCS file: /home/x-cvs/xc/config/cf/lynx.cf,v
retrieving revision 3.47
diff -u -r3.47 lynx.cf
--- config/cf/lynx.cf 24 Apr 2003 22:14:53 -0000 3.47
+++ config/cf/lynx.cf 8 Jan 2004 23:27:40 -0000
@@ -200,7 +200,7 @@
#define StandardCppOptions -traditional
#define StandardCppDefines StandardDefines
#if defined(i386Architecture) || defined(PpcArchitecture)
-# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
# if OSMajorVersion == 2 && OSMinorVersion < 5
# define XkbServerDefines -DNEED_POPEN_WORKAROUND
Index: config/cf/svr3.cf
===================================================================
RCS file: /home/x-cvs/xc/config/cf/svr3.cf,v
retrieving revision 3.15
diff -u -r3.15 svr3.cf
--- config/cf/svr3.cf 19 Aug 2002 03:16:31 -0000 3.15
+++ config/cf/svr3.cf 8 Jan 2004 23:27:47 -0000
@@ -135,7 +135,7 @@
#ifndef ServerOSDefines
# ifdef i386Architecture
-# define ServerOSDefines -DDDXTIME XFree86ServerOSDefines -DPART_NET
+# define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
# else
# define ServerOSDefines -DDDXTIME
# endif
Index: programs/Xserver/Xserver.man
===================================================================
RCS file: /home/x-cvs/xc/programs/Xserver/Xserver.man,v
retrieving revision 3.29
diff -u -r3.29 Xserver.man
--- programs/Xserver/Xserver.man 8 Sep 2003 14:25:26 -0000 3.29
+++ programs/Xserver/Xserver.man 8 Jan 2004 23:34:43 -0000
@@ -187,7 +187,11 @@
.B \-pn
permits the server to continue running if it fails to establish all of
its well-known sockets (connection points for clients), but
-establishes at least one.
+establishes at least one. This option is set by default.
+.TP 8
+.B \-nopn
+causes the server to exit if it fails to establish all of its well-known
+sockets (connection points for clients).
.TP 8
.B \-r
turns off auto-repeat.
Index: programs/Xserver/os/utils.c
===================================================================
RCS file: /home/x-cvs/xc/programs/Xserver/os/utils.c,v
retrieving revision 3.96
diff -u -r3.96 utils.c
--- programs/Xserver/os/utils.c 7 Jan 2004 04:16:37 -0000 3.96
+++ programs/Xserver/os/utils.c 8 Jan 2004 23:30:24 -0000
@@ -586,8 +586,10 @@
defaultKeyboardControl.autoRepeat = TRUE;
-#ifdef PART_NET
- PartialNetwork = TRUE;
+#ifdef NO_PART_NET
+ PartialNetwork = FALSE;
+#else
+ PartialNetwork = TRUE;
#endif
for ( i = 1; i < argc; i++ )
--AqsLC8rIMeq19msA--