Michael Sweet wrote:
> 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,
> #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:
--- 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);
+ /* Allows IPV4 connections to a V6 socket */
+ if (APR_INET6 == sa->family)
+ apr_socket_opt_set(sock, APR_IPV6_V6ONLY, 0);
status = apr_socket_bind(sock, sa);
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
Maybe in 5 or 6 years when someone gets this right we should
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Wed Sep 21 23:22:36 2005