Redirected to devel@

On Sun, 7 Mar 2004, Peter Breitenlohner wrote:

> Dear XFree86 maintainers,

> I fully understand that XFree86 has to support IPv6. The current
> implementation has, however, a serious flaw: when compiled with IPv6 support
> (which is the default for most linux/gnu systems) the progams implicitly
> assume that IPv6 is supported by the kernel. In our case that is not so, and
> in order to get things working I had to
>       #define BuildIPv6               NO
> in xc/config/cf/host.def, thereby permanantly disabling IPv6 support.

> It would be extremely helpful if one could compile XFree86 with IPv6
> support, but then disable IPv6 at runtime via configuration files
> (resources) and/or command line options (in order to avoid various
> timeouts), and the programs should automatically fall back to IPv4 in case
> IPv6 is not supported by the kernel.

> The actual problems encountered were twofold:

> 1. xdm produced an error message
>       chooser socket creation failed
> and there was just a useless parent process but no child process(es) and no
> Xserver was started. I think the lines 69ff in xc/programs/xdm/socket.c
>       #if defined(IPv6) && defined(AF_INET6)
>           chooserFd = socket (AF_INET6, SOCK_STREAM, 0);
>       #else
>           chooserFd = socket (AF_INET, SOCK_STREAM, 0);
>       #endif
> ought to be
>       #if defined(IPv6) && defined(AF_INET6)
>           chooserFd = socket (AF_INET6, SOCK_STREAM, 0);
>           if (chooserFd == -1)
>       #endif
>           chooserFd = socket (AF_INET, SOCK_STREAM, 0);
> although I haven't tested this.

> 2. Trying to start chooser by hand lead to a segmentation fault! With a
> little tracing I found the following code in xc/programs/xdm/chooser.c in
> lines 844ff
>       #if defined(IPv6) && defined(AF_INET6)
>           socket6FD = socket (AF_INET6, SOCK_DGRAM, 0);
>       #endif
> and later in lines 856ff
>           XtAddInput (socketFD, (XtPointer) XtInputReadMask, ReceivePacket,
>                       (XtPointer) &socketFD);
>       #if defined(IPv6) && defined(AF_INET6)
>           XtAddInput (socket6FD, (XtPointer) XtInputReadMask, ReceivePacket,
>                       (XtPointer) &socket6FD);
>       #endif
> The second code fragment certainly ought to be
>           XtAddInput (socketFD, (XtPointer) XtInputReadMask, ReceivePacket,
>                       (XtPointer) &socketFD);
>       #if defined(IPv6) && defined(AF_INET6)
>           if (socket6FD != -1)
>           XtAddInput (socket6FD, (XtPointer) XtInputReadMask, ReceivePacket,
>                       (XtPointer) &socket6FD);
>       #endif
> but that may not suffice. Calling XtAddInput with a untested first argument
> is just asking for serious trouble.

Please check if your changes actually fix the problem.

Thanks.

Marc.

+----------------------------------+-----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310           |
|  Computing and Network Services  |  fax:    1-780-492-1729           |
|  352 General Services Building   |  email:  [EMAIL PROTECTED]          |
|  University of Alberta           +-----------------------------------+
|  Edmonton, Alberta               |                                   |
|  T6G 2H1                         |     Standard disclaimers apply    |
|  CANADA                          |                                   |
+----------------------------------+-----------------------------------+
XFree86 developer and VP.  ATI driver and X server internals.

_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to