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

Re: [PATCH] Add option to svnserve to disable ipv6

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2005-05-25 00:25:00 CEST

Jim Morris wrote:

>Point taken.
>
>I agree, however from the code in main.c it appears that if the code
>detects ipv6 then it will ask apr to only create an ipv6 binding, so I
>think this may be your point a)
>
>However I am not familiar enough with apr or svnserve to set up two
>listening ports, one for ipv4 and one for ipv6 (if that is what needs to
>be done), I hope someone out there may be able to do that.
>
>The fix I submitted is for anoyone like me who upgraded to 1.2.0 and
>found themselves without a useable snv server :) and needs a quick fix.
>
>
Sure. Could you try this patch instead? I can't test it myself, as I
don't have an IPV6 network.

Index: subversion/svnserve/main.c
===================================================================
--- subversion/svnserve/main.c (revision 14826)
+++ 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)
     {

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 25 00:25:45 2005

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