You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jim Morris <mo...@wolfman.com> on 2005/05/24 21:44:55 UTC
Re[2]: [PATCH] Add option to svnserve to disable ipv6
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.
On Tue, 24 May 2005 23:35:53 +0200
Branko Cibej <br...@xbc.nu> wrote:
brane> Jim Morris wrote:
brane>
brane> > * subversion/svnserve/main.c
brane> > (main): Add --noipv6 option, and if set do not bind to an ipv6 port
brane> >
brane> > On at least one system I am using (OpenBSD) the 1.2.0 version of
brane> > svnserve detects there is an ipv6 network, and binds to that network
brane> > ONLY. So there is no listening port setup on ipv4, so no ipv4 clients
brane> > can connect.
brane> >
brane> > As I do not use ipv6 I added an option --noipv6 which will force it to
brane> > bind to the ipv4 network as previous versions did.
brane> >
brane> > Others with both ipv6 and ipv4 on their systems may encounter similar
brane> > problems as I do not think this is specific to OpenBSD.
brane> >
brane> > Ideally the fix should actually allow it to bind to both ipv6 and ipv4
brane> > networks, however that fix is beyond me at the moment.
brane>
brane> I sympathize, but i really don't think this patch is appropriate for the
brane> SVN code. The thing to do is to figure out if a) we're using APR
brane> incorrectly, b) there's actually a bug _in_ apr, or c) there's a bug in
brane> the way APR was built on your system.
brane>
brane> Note that I'm not saying your problem isn't real or shouldn't be fixed,
brane> just that this isn't the way to fix it in the mainstream code.
brane>
brane> -- Brane
brane>
brane>
brane> ---------------------------------------------------------------------
brane> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
brane> For additional commands, e-mail: dev-help@subversion.tigris.org
brane>
--
Jim Morris morris@wolfman.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] Add option to svnserve to disable ipv6
Posted by Jim Morris <mo...@wolfman.com>.
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
Re: [PATCH] Add option to svnserve to disable ipv6
Posted by Branko Čibej <br...@xbc.nu>.
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