On Fri, 2005-09-23 at 22:09 -0400, Greg Hudson wrote:
> On Fri, 2005-09-23 at 21:54 -0400, Michael Sweet wrote:
> > > Even if we set IPV6_V6ONLY on the v6 socket?
> >
> > Yes, because on OpenBSD (and perhaps others of the *BSD lineage)
> > the IPV6_V6ONLY socket option is apparently read-only...
>
> Yes, but I'm talking about setting it to 1, so that we can create the
> two separate sockets. On OpenBSD it's read-only, but it's always set to
> 1.
>
> > > (If the OS does not define
> > > IPV6_V6ONLY, then I think we can safely assume that it will allow v4 and
> > > v6 connections on the same socket.)
> >
> > No, actually, I don't think that is the case.
>
> Okay. So we create an IPV6 socket, set IPV6_V6ONLY to 1 if possible,
> then create an IPV4 socket. If the second bind call fails with an
> address-in-use error, we assume the V6 socket is handling V4 connections
> and the stack was incapable of turning off v4 mappings.
Not that i expect this to happen in time for 1.3 to branch, but it would
be nice to include this functionality in APR (IE something to simply
create socket(s) for an ipv4 and ipv6 listening on a given address, and
return the number of sockets created + an array of 1 or more sockets).
Also, if you ever find out who decided not to standardize this one way
or the other due to lack of consensus (consequently screwing *all future
implementors and developers instead of one or two early ones*), let me
know. I'd like to punch him/her in the face.
:)
>
> For reference, I've included a test program which successfully creates
> and binds to v6 and v4 sockets on the any address under Linux (RHEL 4).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Sep 24 05:36:24 2005