[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: Jim Morris <morris_at_wolfman.com>
Date: 2005-05-25 01:21:06 CEST

Hi,

Ok the call returns EINVAL, but I think you are on the right track, I
found some googles on
APR_IPV6_V6ONLY relating to *BSD type systems, and I think there was a
patch applied to apr to fix this. I am still seeing if the version of
apr we use has that fixed or not. It is a pretty old fix though...

http://66.102.7.104/search?q=cache:IE83Li-GMBwJ:article.gmane.org/gmane.comp.apache.apr.cvs/2566+apr_socket_opt_set+APR_IPV6_V6ONLY&hl=en&client=firefox-a

Branko Čibej wrote:

> 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 01:22:00 2005

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