On Wed, 23 Jul 2003, Egbert Eich wrote:
> Fabio Massimo Di Nitto writes:
> > On Tue, 22 Jul 2003, Matthias Scheler wrote:
> >
> > > On Tue, Jul 22, 2003 at 08:03:35PM +0200, Egbert Eich wrote:
> > > > The current CVS code produces the error:
> > > >
> > > > _XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
> > > > _XSERVTransMakeAllCOTSServerListeners: server already running
> > > >
> > > > Fatal server error:
> > > > Cannot establish any listening sockets - Make sure an X server isn't already
> running
> > > >
> > > > bind() returns an EADDRINUSE error when binding to the second IP
> > > > protocol (in CVS it is IPv6).
> > > >
> > > > When I switch the order of initialization around and skip the IPv4
> > > > protocol if IPv6 initialization was successful, everything works:
> > > > I can connect thru IPv6 and IPv4.
> > >
> > > This sounds like a bug in Linux's socket implementation.
> >
> > Not really. Linux has been always working like this. the USAGI patch for
> > linux kernel implements a runtime configurable option to separate ipv6 and
> > ipv4 bindings.
>
>
> Something like:
>
> int off = 0;
> [...]
> if (setsockopt(listen_socket, IPPROTO_IPV6, IPV6_V6ONLY, &off,
> sizeof (off)) < 0) {
>
> ?
> This of course would help, however it wouldn't address the problem on
> the existing systems.
>
I didn't check/produce any code but the easiest way to implement in linux
is something like (if the user does not specify --nolisten):
bind to ipv6
if it works ok
otherwise fail silently
bind to ipv4
if it works ok
otherwise fail with error message.
specifing --nolisten the "fail" conditions might change their behaviour.
This is basically what i did when i first tried the ipv6 kame patch for X.
Fabio
--
Our mission: make IPv6 the default IP protocol
"We are on a mission from God" - Elwood Blues
http://www.itojun.org/paper/itojun-nanog-200210-ipv6isp/mgp00004.html
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel