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

Re: Branching for 1.3.

From: Sigfred Håversen <bsdlist_at_mumak.com>
Date: 2005-09-21 23:21:54 CEST

Michael Sweet wrote:
[snip]
>
> Having just completed the IPv6 support code for CUPS 1.2, the best
> thing to do is to conditionally set the IPV6_V6ONLY socket option,
> e.g.:
>
> #ifdef IPV6_V6ONLY
> int val = 0;
> setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val));
> #endif /* IPV6_V6ONLY */
>
> I'm not sure how to do this with APR calls, but basically *BSD
> defaults IPv6 sockets to only listen for IPv6 connections - you
> have to use the above setsockopt magic to get a single socket
> to accept both IPv6 and IPv4 connections.
>

I'm vary touching the socket creating part in svnserve, except
adding a test like "if (use_ipv6)" around creating of IPv6 socket.
Anything else might break something one in one OS or another.

I should have searched the mailinglists properly... However,
in May (thread "[PATCH] Add option to svnserve to disable ipv6")
there was a patch almost identical to mine that was rejected, so
I see no point in sending in the patch I've prepared.

In the same thread there is a patch that does not work:

Index: subversion/svnserve/main.c
===================================================================
--- subversion/svnserve/main.c (revision 15318)
+++ subversion/svnserve/main.c (working copy)
@@ -452,6 +452,12 @@
    * restarted. */
   apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);

+#if APR_HAVE_IPV6
+ /* Allows IPV4 connections to a V6 socket */
+ if (APR_INET6 == sa->family)
+ apr_socket_opt_set(sock, APR_IPV6_V6ONLY, 0);
+#endif
+
   status = apr_socket_bind(sock, sa);
   if (status)
     {

I wrote the patch the way I did because (thread "svn 1.2.x
cannot reach dual-stack svnserve with IPv4", July) what
Daniel Berlin wrote:

[snip] "I'm tempted to just give up any pretense of ipv6 support and remove the
existing code that deals with it in svnserve.
It seems it's been a lot more trouble than it's worth, because things
like to tell us about ipv6 addresses, etc, when the actual machine can't
support it.

Maybe in 5 or 6 years when someone gets this right we should
reimplement.
--Dan
"

/Sigfred

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 21 23:22:36 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.