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

Re: [PATCH] use ipv4 if the ipv6 address cant be reached

From: David Glasser <glasser_at_davidglasser.net>
Date: Fri, 1 Feb 2008 14:25:08 -0800

Has anyone familiar with these issues had the chance to review this?

--dave

On Jan 23, 2008 7:06 AM, Olaf Hering <olh_at_suse.de> wrote:
>
> Fall back to ipv4 if the host has an ipv6 address,
> but doesnt respond to ipv6 right now.
> This change worked for us.
>
> https://bugzilla.novell.com/show_bug.cgi?id=193350
>
> ---
> subversion/libsvn_ra_svn/client.c | 20 ++++++++++++++++++++
> 1 file changed, 20 insertions(+)
>
> --- a/subversion/libsvn_ra_svn/client.c
> +++ b/subversion/libsvn_ra_svn/client.c
> @@ -145,10 +145,30 @@ static svn_error_t *make_connection(cons
> return svn_error_wrap_apr(status, _("Can't create socket"));
>
> status = apr_socket_connect(*sock, sa);
> + if (!status)
> + goto out;
> + if (sa->family == APR_INET6) {
> + status = apr_sockaddr_info_get(&sa, hostname, APR_INET, port, 0, pool);
> + if (status)
> + return svn_error_createf(status, NULL, _("Unknown hostname '%s'"),
> + hostname);
> +#ifdef MAX_SECS_TO_LINGER
> + /* ### old APR interface */
> + status = apr_socket_create(sock, sa->family, SOCK_STREAM, pool);
> +#else
> + status = apr_socket_create(sock, sa->family, SOCK_STREAM, APR_PROTO_TCP,
> + pool);
> +#endif
> + if (status)
> + return svn_error_wrap_apr(status, _("Can't create socket"));
> +
> + status = apr_socket_connect(*sock, sa);
> + }
> if (status)
> return svn_error_wrap_apr(status, _("Can't connect to host '%s'"),
> hostname);
>
> +out:
> return SVN_NO_ERROR;
> }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
>
>

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-01 23:25:19 CET

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