Does anybody have a firmer grasp on the semantic differences between old APR and new APR for hostname=NULL/family=APR_INET? If so, then perhaps server/config.c needs to be changed to just create an all-zeros socket address manually, without involving the resolver. (Or we ask ourselves if the APR semantics should have changed.)
We have to have hostname=NULL get passed to the resolver with the AI_PASSIVE flag in order to correctly get our own addresses. There's no other way to do that at the OS level with the getaddrinfo() API, which is what apr_sockaddr_info_get is supposed to be wrapping on IPv6-capable boxes. So, having NULL mean 'create 0.0.0.0' can't work.
As for why httpd is doing this code rather than something like:
apr_sockaddr_ip_set(&sa->addrs->host_addr, APR_ANYADDR);
beats me. That code snippet never seemed to fit quite right in the scheme of things. I think it's trying to just ensure that it's creating a 0.0.0.0 address. But, that's rather foolish. A box might not have IPv4 configured, but only IPv6. Surely there's a better way to represent that a specific vhost hasn't been configured against an IP address? -- justin
