nucc1


Found
r905595

r905595 | stsp | 2010-02-02 12:02:40 +0000 (Tue, 02 Feb 2010)

Make svnserve in deamon mode prefer IPv4 addresses when resolving
the listen hostname, and add a switch to make it prefer IPv6 instead.

This avoids the typical "I just started svnserve and it refuses all
connections" problem, which is caused by svnserve defaulting to an
IPv6 wildcard socket on a server which is on an IPv4-only network.

Reported by: nucc1
(via IRC in #svn, but it's been reported countless times before)

* subversion/svnserve/main.c
  (svnserve__options): Add a --prefer-ipv6 option (short form -6).
   In the help text, document that listening on IPv4 and IPv6 addresses
   at the same time is not supported in daemon mode, and suggest workarounds.
  (main): If APR was compiled with IPv6 support, prefer IPv4 addresses
   by default when resolving the listen hostname, unless the -6 option
   was passed. If APR was not compiled with IPv6 support, the -6 option
   is silently ignored.