Re: IPv6 problems on Linux

2003-07-28 Thread Egbert Eich
Matthieu Herrb writes: I wrote (in a message from Sunday 27) Keith Packard wrote (in a message from Wednesday 23) While supporting multiple -nolisten arguments is good, I suggest that the current '-nolisten tcp' should include both inet4 and inet6 tcp options; most

Re: IPv6 problems on Linux

2003-07-28 Thread Todd T. Fries
Penned by Dr Andrew C Aitchison on Thu, Jul 24, 2003 at 04:30:47PM +0100, we have: [..] | Aside: | Which operating systems are shipping with IPv6 enabled by default ? OpenBSD ships with IPv6 enabled by default. Anytime an interface is brought up, an inet6 link-local address is automatically

Re: IPv6 problems on Linux

2003-07-28 Thread Alexander Pohoyda
Todd T. Fries [EMAIL PROTECTED] writes: Penned by Dr Andrew C Aitchison on Thu, Jul 24, 2003 at 04:30:47PM +0100, we have: [..] | Aside: | Which operating systems are shipping with IPv6 enabled by default ? OpenBSD ships with IPv6 enabled by default. Anytime an interface is brought

Re: IPv6 problems on Linux

2003-07-27 Thread Matthieu Herrb
Keith Packard wrote (in a message from Wednesday 23) While supporting multiple -nolisten arguments is good, I suggest that the current '-nolisten tcp' should include both inet4 and inet6 tcp options; most people use '-nolisten tcp' to avoid exposing an open port to the X server to the

Re: IPv6 problems on Linux

2003-07-27 Thread Matthieu Herrb
I wrote (in a message from Sunday 27) Keith Packard wrote (in a message from Wednesday 23) While supporting multiple -nolisten arguments is good, I suggest that the current '-nolisten tcp' should include both inet4 and inet6 tcp options; most people use '-nolisten tcp' to avoid

Re: IPv6 problems on Linux

2003-07-24 Thread Egbert Eich
Marc Aurele La France writes: On Wed, 23 Jul 2003, Egbert Eich wrote: Marc Aurele La France writes: I don't like the peppering of this code with more OS #ifdef's. I think the approach espoused by Itojun, Todd, Matthieu and Andrew is better. So maybe you can tell what the

Re: IPv6 problems on Linux

2003-07-24 Thread Egbert Eich
This 'nolisten' code was added on 1996/11/24 with revision 3.22. The cvs log only says: revision 3.22 date: 1996/11/24 09:58:50; author: dawes; state: Exp; lines: +14 -1 updates I would assume it was taken straight from a SI merge. Alan Coopersmith writes: Maybe I'm missing something,

Re: IPv6 problems on Linux

2003-07-24 Thread Egbert Eich
Hmm, with the current approach a -nolisten to an alias has no effect anyway. A '-nolisten tcp' will have the same effect as a '-nolisten unix': None. The reason is that a flag is set for the protocol however when the protocols are initialized the aliases aren't checked. Also tcp is aliased

Re: IPv6 problems on Linux

2003-07-24 Thread Egbert Eich
Andrew C Aitchison writes: Egbert's latest patch compiles and runs, but it isn't addressing my problem. This is with Red Hat 8.0 Linux 2.4.20-19.8 gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) (I have the same problem with Red Hat 6.2). The system is *not*

Re: IPv6 problems on Linux

2003-07-24 Thread Alan Coopersmith
Egbert Eich wrote: This 'nolisten' code was added on 1996/11/24 with revision 3.22. The cvs log only says: revision 3.22 date: 1996/11/24 09:58:50; author: dawes; state: Exp; lines: +14 -1 updates I would assume it was taken straight from a SI merge. The SI doesn't have the -nolisten option.

Re: IPv6 problems on Linux

2003-07-24 Thread Dr Andrew C Aitchison
On Thu, 24 Jul 2003, Egbert Eich wrote: Can we just declare that inet and inet6 both match tcp ? The way the code is currently written aliases like tcp alias to exactly one transport type. There is no fallback mechanism. The easiest way would be to alias tcp to inet instead of inet6.

Re: IPv6 problems on Linux

2003-07-24 Thread Matthias Scheler
On Thu, Jul 24, 2003 at 04:30:47PM +0100, Dr Andrew C Aitchison wrote: Which operating systems are shipping with IPv6 enabled by default ? NetBSD has IPv6 enable by default, Solaris hasn't. Kind regards -- Matthias Scheler http://scheler.de/~matthias/

Re: IPv6 problems on Linux

2003-07-24 Thread Alan Coopersmith
Matthias Scheler wrote: On Thu, Jul 24, 2003 at 04:30:47PM +0100, Dr Andrew C Aitchison wrote: Which operating systems are shipping with IPv6 enabled by default ? NetBSD has IPv6 enable by default, Solaris hasn't. Solaris sort of does - on Solaris 8 and later, you can always use an AF_INET6

Re: IPv6 problems on Linux

2003-07-24 Thread David Dawes
On Wed, Jul 23, 2003 at 11:34:53PM -0400, Keith Packard wrote: Around 23 o'clock on Jul 23, Matthieu Herrb wrote: Here's a patch to allow multiple '-nolisten' options on the command line. To disable both IPv4 and IPv6 transports, one needs to say: X -nolisten tcp -nolisten inet6

Re: IPv6 problems on Linux

2003-07-23 Thread Andrew C Aitchison
On Tue, 22 Jul 2003, Alan Coopersmith wrote: Egbert Eich wrote: 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 was one of the patches suggested to the X.org

Re: IPv6 problems on Linux

2003-07-23 Thread Matthias Scheler
On Wed, Jul 23, 2003 at 07:38:11AM +0100, Andrew C Aitchison wrote: So, what we do is as follows: (1) At this point we set up two addresses, one containing : to indicate an IPv6 wildcard address, ... That should read ::. (2) Later, when we create the IPv6 socket, we set IPV6_V6ONLY if

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
Matthias Scheler writes: On Tue, Jul 22, 2003 at 09:14:08PM +0200, Egbert Eich wrote: As I tried to explain binding to an IPv6 socket implicitely binds to an IPv4 socket. That's a bug. According to what I've heared it is intended and therefore considered a feature. I'm not going

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
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

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
Matthias Scheler writes: I wasn't suggesting to use it on Linux. My suggestion was to revert to using a single socket on all platforms and use the above code to enable accepting IPv4 connections on *BSD. Yes, I understand. I was just looking for a decend way of making things work on

Forwarded from Jun-ichiro itojun Hagino: Re: IPv6 problems on Linux

2003-07-23 Thread Matthieu Herrb
---BeginMessage--- (todd and matthieu, if this does not go through please forward it) I wasn't suggesting to use it on Linux. My suggestion was to revert to using a single socket on all platforms and use the above code to enable accepting IPv4 connections on *BSD. there is

Re: IPv6 problems on Linux

2003-07-23 Thread Fabio Massimo Di Nitto
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:

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
I've made the patch below which takes care of the problem for me. I have tried several different versions, I didn't really like any of them. This code is one of the rare pieces of code that is rather well structured and relatively free of any ugly hacks. This fix makes it a lot uglier, what I

Re: IPv6 problems on Linux

2003-07-23 Thread Dr Andrew C Aitchison
On Wed, 23 Jul 2003, Egbert Eich wrote: I've made the patch below which takes care of the problem for me. make[3]: Entering directory `/home/XFree86/4.2/std/xc/lib/ICE' rm -f transport.o gcc -m32 -c -O2 -fno-strength-reduce -fno-strict-aliasing -ansi -pedantic -Wall -Wpointer-arith

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
Fabio Massimo Di Nitto writes: 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

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
Oops, I haven't rebuilt the server. Maybe this should be changed to int, 0 and 1. Egbert. Dr Andrew C Aitchison writes: On Wed, 23 Jul 2003, Egbert Eich wrote: I've made the patch below which takes care of the problem for me. make[3]: Entering directory

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
Marc Aurele La France writes: I don't like the peppering of this code with more OS #ifdef's. I think the approach espoused by Itojun, Todd, Matthieu and Andrew is better. So maybe you can tell what the big difference is? It tries to preserve more of the old behavoir with respect to the

Re: IPv6 problems on Linux

2003-07-23 Thread Egbert Eich
I've accidently sent the wrong file before. Sorry. Egbert. Index: Xtrans.c === RCS file: /home/x-cvs/xc/lib/xtrans/Xtrans.c,v retrieving revision 3.31 diff -u -r3.31 Xtrans.c --- Xtrans.c20 Jul 2003 16:12:15 - 3.31 +++

Re: IPv6 problems on Linux

2003-07-23 Thread Marc Aurele La France
On Wed, 23 Jul 2003, Egbert Eich wrote: Marc Aurele La France writes: I don't like the peppering of this code with more OS #ifdef's. I think the approach espoused by Itojun, Todd, Matthieu and Andrew is better. So maybe you can tell what the big difference is? So maybe not. I've

Re: IPv6 problems on Linux

2003-07-23 Thread Matthieu Herrb
Here's a patch to allow multiple '-nolisten' options on the command line. To disable both IPv4 and IPv6 transports, one needs to say: X -nolisten tcp -nolisten inet6 I'll add a documentation patch too later. Index: xc/programs/Xserver/include/os.h

Re: IPv6 problems on Linux

2003-07-23 Thread Alan Coopersmith
Maybe I'm missing something, but I always thought the XFree86 nolisten code was overly complicated, and this just seems to make it worse. When we added -nolisten to Xsun, we got multiple listeners for free with a simpler implementation, contained entirely in utils.c: else if ( strcmp(

Re: IPv6 problems on Linux

2003-07-23 Thread Elliott Mitchell
From: Matthias Scheler [EMAIL PROTECTED] On Wed, Jul 23, 2003 at 01:48:08PM +0200, Egbert Eich wrote: I wasn't suggesting to use it on Linux. My suggestion was to revert to using a single socket on all platforms and use the above code to enable accepting IPv4 connections on *BSD.

Re: IPv6 problems on Linux

2003-07-23 Thread Keith Packard
Around 23 o'clock on Jul 23, Matthieu Herrb wrote: Here's a patch to allow multiple '-nolisten' options on the command line. To disable both IPv4 and IPv6 transports, one needs to say: X -nolisten tcp -nolisten inet6 While supporting multiple -nolisten arguments is good, I suggest

Re: IPv6 problems on Linux

2003-07-23 Thread Todd T. Fries
I'd like to say this was a head scratcher for me. I like Keith's thouhts on this. -- Todd Fries .. [EMAIL PROTECTED] Free Daemon Consulting, LLCLand: 405-748-4596 http://FreeDaemonConsulting.com Mobile: 405-203-6124 ..in support of free software solutions. Key

IPv6 problems on Linux

2003-07-22 Thread Egbert Eich
When creating an IPv6 socket on Linux an IPv4 socket seems to be created also. The current CVS code produces the error: _XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed _XSERVTransMakeAllCOTSServerListeners: server already running Fatal server error: Cannot establish any

Re: IPv6 problems on Linux

2003-07-22 Thread Egbert Eich
Matthias Scheler writes: This sounds like a bug in Linux's socket implementation. It should allow an IPv4 and an IPv6 socket to bind to the same port number. This is a common programming pratice for *BSD or Solaris. As I tried to explain binding to an IPv6 socket implicitely binds to

Re: IPv6 problems on Linux

2003-07-22 Thread Egbert Eich
Matthias Scheler writes: It is necessary in at least NetBSD and OpenBSD because the kernel won't let you accept IPv4 connection on an IPv6 socket by default. As FreeBSD's IPv6 is AFAK also KAME based I would expect that it shows the same behaviour. ... while simply binding to IPv6 and

Re: IPv6 problems on Linux

2003-07-22 Thread Alan Coopersmith
Egbert Eich wrote: Alan Coopersmith writes: This was one of the patches suggested to the X.org IPv6 review which we declined to include in our patch set, but which got checked into the XFree86 CVS anyway. We were told that separately binding to both is the usual habit on OpenBSD,

Re: IPv6 problems on Linux

2003-07-22 Thread Matthias Scheler
On Tue, Jul 22, 2003 at 09:14:08PM +0200, Egbert Eich wrote: As I tried to explain binding to an IPv6 socket implicitely binds to an IPv4 socket. That's a bug. Kind regards -- Matthias Scheler http://scheler.de/~matthias/

Re: IPv6 problems on Linux

2003-07-22 Thread Matthias Scheler
On Tue, Jul 22, 2003 at 09:23:31PM +0200, Egbert Eich wrote: You can use that scheme in *BSD, too, if you use setsockopt() like this: int off = 0; [...] if (setsockopt(listen_socket, IPPROTO_IPV6, IPV6_V6ONLY, off, sizeof (off)) 0) { /* error handling

Re: IPv6 problems on Linux

2003-07-22 Thread Fabio Massimo Di Nitto
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