[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Regression in svnserve: IPv6 causes IPv4 not to work [was: Branching for 1.3.]

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-09-24 04:09:50 CEST

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.

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

Received on Sat Sep 24 04:11:32 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.