Justin Erenkrantz wrote:

When I updated to HEAD just now on my Solaris box, httpd wouldn't start
with this:

[Mon Aug 11 19:10:08 2003] [crit] (EAI 8)host/servname not known:
alloc_listener: failed to set up sockaddr for ::

I wonder if this is related to Joe's recent change to apr_sockaddr_info_get(), where IPv6 won't be returned if the system doesn't support it. Does reverting Joe's additional flag make any difference? (AI_ADDRCONFIG) It probably does, since ISTR we're specifying AF_UNSPEC for the family, and family=AF_UNSPEC is where AI_ADDRCONFIG works its magic.


If you back out the AI_ADDRCONFIG flag, is Apache able to get an IPv6 socket and handle incoming IPv4 connections when you have plain "listen ###"?

I guess find_default_family() has to make use of the fact that getaddrinfo("::", AF_UNSPEC, AI_ADDRCONFIG) will fail now in some scenarios where everything was happy before.

Something that simple should work.  Yet, it looks like if we have IPv6
compiled in, we will assume that all non-qualified addresses are IPv6.
That seems wrong.  (I have no idea why this never appeared before.)

It isn't quite that simple. If there is a non-qualified address in the config, we try to figure out if the box supports IPv6, and if it does then we get an IPv6 listening socket for that port.


Any arguments on tossing the find_default_family function altogether, and
just going to 0.0.0.0 when the addr isn't specified?  If you want IPv6, you
should explicitly specify it with 'Listen ::8080' or something, but
assuming that since we have IPv6 available that the unqualified addresses
must be IPv6 doesn't make sense and is badness.  -- justin

Somehow I don't see the badness :) The philosophy has been:


If your box is set up for IPv4+IPv6, Apache by default will handle connections over either; if your box is set up for just IPv4, Apache by default will notice that. Isn't that goodness?

If the current problem is that find_default_family() needs to be smarter since AI_ADDRCONFIG makes some of the IPv6 logic fail where it didn't fail before, then let's make it smarter.




Reply via email to