Loading CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,9 @@ Changes with Apache 2.3.14 *) core: For '*' or '_default_' vhosts, use a wildcard address of any address family, rather than IPv4 only. [Joe Orton] *) core, mod_rewrite, mod_ssl, mod_nw_ssl: Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as mandated by RFC 3875. PR 26005. [Stefan Fritsch] Loading server/vhost.c +11 −4 Original line number Diff line number Diff line Loading @@ -189,9 +189,9 @@ static const char *get_addresses(apr_pool_t *p, const char *w_, } if (strcmp(host, "*") == 0 || strcasecmp(host, "_default_") == 0) { rv = apr_sockaddr_info_get(&my_addr, "0.0.0.0", APR_INET, port, 0, p); rv = apr_sockaddr_info_get(&my_addr, NULL, APR_UNSPEC, port, 0, p); if (rv) { return "Could not resolve address '0.0.0.0' -- " return "Could not determine a wildcard address ('0.0.0.0') -- " "check resolver configuration."; } } Loading Loading @@ -422,6 +422,13 @@ static ipaddr_chain *find_default_server(apr_port_t port) return wild_match; } #if APR_HAVE_IPV6 #define IS_IN6_ANYADDR(ad) ((ad)->family == APR_INET6 \ && IN6_IS_ADDR_UNSPECIFIED(&(ad)->sa.sin6.sin6_addr)) #else #define IS_IN6_ANYADDR(ad) (0) #endif static void dump_a_vhost(apr_file_t *f, ipaddr_chain *ic) { name_chain *nc; Loading @@ -429,8 +436,8 @@ static void dump_a_vhost(apr_file_t *f, ipaddr_chain *ic) char buf[MAX_STRING_LEN]; apr_sockaddr_t *ha = ic->sar->host_addr; if (ha->family == APR_INET && ha->sa.sin.sin_addr.s_addr == INADDR_ANY) { if ((ha->family == APR_INET && ha->sa.sin.sin_addr.s_addr == INADDR_ANY) || IS_IN6_ANYADDR(ha)) { len = apr_snprintf(buf, sizeof(buf), "*:%u", ic->sar->host_port); } Loading Loading
CHANGES +3 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,9 @@ Changes with Apache 2.3.14 *) core: For '*' or '_default_' vhosts, use a wildcard address of any address family, rather than IPv4 only. [Joe Orton] *) core, mod_rewrite, mod_ssl, mod_nw_ssl: Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as mandated by RFC 3875. PR 26005. [Stefan Fritsch] Loading
server/vhost.c +11 −4 Original line number Diff line number Diff line Loading @@ -189,9 +189,9 @@ static const char *get_addresses(apr_pool_t *p, const char *w_, } if (strcmp(host, "*") == 0 || strcasecmp(host, "_default_") == 0) { rv = apr_sockaddr_info_get(&my_addr, "0.0.0.0", APR_INET, port, 0, p); rv = apr_sockaddr_info_get(&my_addr, NULL, APR_UNSPEC, port, 0, p); if (rv) { return "Could not resolve address '0.0.0.0' -- " return "Could not determine a wildcard address ('0.0.0.0') -- " "check resolver configuration."; } } Loading Loading @@ -422,6 +422,13 @@ static ipaddr_chain *find_default_server(apr_port_t port) return wild_match; } #if APR_HAVE_IPV6 #define IS_IN6_ANYADDR(ad) ((ad)->family == APR_INET6 \ && IN6_IS_ADDR_UNSPECIFIED(&(ad)->sa.sin6.sin6_addr)) #else #define IS_IN6_ANYADDR(ad) (0) #endif static void dump_a_vhost(apr_file_t *f, ipaddr_chain *ic) { name_chain *nc; Loading @@ -429,8 +436,8 @@ static void dump_a_vhost(apr_file_t *f, ipaddr_chain *ic) char buf[MAX_STRING_LEN]; apr_sockaddr_t *ha = ic->sar->host_addr; if (ha->family == APR_INET && ha->sa.sin.sin_addr.s_addr == INADDR_ANY) { if ((ha->family == APR_INET && ha->sa.sin.sin_addr.s_addr == INADDR_ANY) || IS_IN6_ANYADDR(ha)) { len = apr_snprintf(buf, sizeof(buf), "*:%u", ic->sar->host_port); } Loading