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

[PATCH] Fix svnserve not accepting IPV4 connections on an IPV6 socket?

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-07-12 03:59:23 CEST

In this thread, http://svn.haxx.se/dev/archive-2005-05/1172.shtml, I
suggested a patch for svnserve that should theoretically allow IPV4
connections to V6 sockets on those systems that don't allow such by
default. I found this patch still lying around on my box, and since I
can't test it myself (and it seems not to work on *BSD, according to
that thread), I thought I'd post it here for the record.

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)
     {

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 12 04:00:55 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.