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

Re: svn commit: r13236 - in trunk: . subversion/svnserve

From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-03-04 02:28:29 CET

On Fri, 2005-03-04 at 01:07 +0000, Philip Martin wrote:
> Philip Martin <philip@codematters.co.uk> writes:
>
> > dberlin@tigris.org writes:
> >
> >> Author: dberlin
> >> Date: Wed Mar 2 12:05:32 2005
> >> New Revision: 13236
> >>
> >> Modified:
> >> trunk/Makefile.in
> >> trunk/subversion/svnserve/main.c
> >> Log:
> >> Add IPV6 listen support to svnserve
> >>
> >> * Makefile.in: Add svncheck6
> >> * subversion/svnserve/main.c (main): Get listen host info first,
> >> then use resulting family in the socket creation.
> >
> > This appears to break svnserve on my machine. I now get
> >
> > $ subversion/svnserve/svnserve -dr.
> > Can't create server socket: Address family not supported by protocol
> >
> > It works if I go back to r13235.
>
> The working code does:
>
> $ strace -etrace=socket subversion/svnserve/.libs/lt-svnserve -dr.
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
>
> the failing code does:
>
> $ strace -etrace=socket subversion/svnserve/.libs/lt-svnserve -dr.
> socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 EAFNOSUPPORT (Address family not supported by protocol)
>
> I'm using a Linux without IPV6 support

Again, that's not enough of an strace. Can you please put the whole
thing somewhere?
APR has code that does this:

 int family = ofamily;

    if (family == APR_UNSPEC) {
#if APR_HAVE_IPV6
        family = APR_INET6;
#else
        family = APR_INET;
#endif
    }

    alloc_socket(new, cont);

    (*new)->socketdes = socket(family, type, protocol);

#if APR_HAVE_IPV6
    if ((*new)->socketdes < 0 && ofamily == APR_UNSPEC) {
        family = APR_INET;
        (*new)->socketdes = socket(family, type, protocol);
    }
#endif

    if ((*new)->socketdes < 0) {
        return errno;
    }
    set_socket_vars(*new, family, type, protocol);

    (*new)->timeout = -1;
    (*new)->inherit = 0;
    apr_pool_cleanup_register((*new)->cntxt, (void *)(*new),
socket_cleanup,
                              socket_cleanup);
    return APR_SUCCESS;

So it should try ipv6 first, then when it falis like it did in your
strace, try regular ipv4.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 4 02:29:45 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.