Lucian Adrian Grijincu wrote:
> the cause: segmentation fault at:
>      rv = apr_socket_bind(sock, to);
> from static void sendto_receivefrom(abts_case *tc, void *data)
> from testsockets.c
> the second parameter given is NULL:
>      apr_socket_bind (sock=0x80d3c78, sa=0x0) at network_io/unix/sockets.c:154
> 
> the NULL value comes from
>      rv = apr_sockaddr_info_get(&to, addr, APR_UNSPEC, 7772, 0, p);
> Which was supposed to initialize it, but failed to.
> 
> digging deeper we get into network_io/unix/soccaddr.c, where there's a
> this call
>      error = getaddrinfo(hostname, servname, &hints, &ai_list);
> This returns -9 which gai_strerror says it means "Address family for
> hostname not supported".
> getaddrinfo's input params are:
>    hostname ="::1"
>    servname = 0x0
>    hints         = {ai_flags = AI_ADDRCONFIG, ai_family = 0,
> ai_socktype = 1, ai_protocol = 0, ai_addrlen = 0, ai_addr = 0x0,
> ai_canonname = 0x0, ai_next = 0x0}
> 

Hum, it seems the call_resolver (or the test) code is wrong because for
APR_UNSPEC it adds AI_ADDRCONFIG to the flags, which excludes loopback
addresses.

According to the getaddrinfo documentation, the loopback address is not
considered a valid configured address.

--
Davi Arnaut

Reply via email to