On Wed, Jun 06, 2007 at 01:39:52PM -0300, Davi Arnaut wrote: > > 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
Now looking at the actual bug in the test ... Seems like it's acceptable to fall back to 127.0.0.1 in that situation though, as an easy fix. So if we use the _info_get() call as the test instead of "can we create an IPv6 socket", that's enough. But if we do use IPv6, there are other problems, later on in the code (at least on trunk) ... 164 apr_sockaddr_info_get(&from, "127.1.2.3", APR_INET, 4242, 0, p); 165 166 len = 80; 167 rv = apr_socket_recvfrom(from, sock, 0, recvbuf, &len); if sock is an IPv6 socket, that's not going to be fun! Looking at the test, I think we should have two tests, one for IPv6 and one for IPv4. Run them both, allow the IPv6 one to fail (if the module is not loaded or whatever). Does that seem acceptable to people ? I volunteer to help make the changes anyway, the current state is a mess :-) -- Colm MacCárthaigh Public Key: [EMAIL PROTECTED]