# HG changeset patch # User Igor Sysoev # Date 1292354347 0 # Node ID 935c5eb13c7d3dfa68983d22c0bea34f1bad266b # Parent 9ccda889a355032214602e760bf097759b3fd623 merge r3659, r3825, r3826: IPv6 related fixes: *) fix IPv6 listen socket handling while reconfiguring *) test wildcard tail hash existance for IPv6 addresses, the same fix for IPv4 addresses has been made in r2581 *) always run regex in server_name to get captures for IPv6 addresses, the same fix for IPv4 addresses has been made in r2584 diff --git a/src/core/ngx_cycle.c b/src/core/ngx_cycle.c --- a/src/core/ngx_cycle.c +++ b/src/core/ngx_cycle.c @@ -847,7 +847,7 @@ ngx_cmp_sockaddr(struct sockaddr *sa1, s sin61 = (struct sockaddr_in6 *) sa1; sin62 = (struct sockaddr_in6 *) sa2; - if (sin61->sin6_port != sin61->sin6_port) { + if (sin61->sin6_port != sin62->sin6_port) { return NGX_DECLINED; } diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1831,8 +1831,12 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_ if (addr[i].hash.buckets == NULL && (addr[i].wc_head == NULL || addr[i].wc_head->hash.buckets == NULL) - && (addr[i].wc_head == NULL - || addr[i].wc_head->hash.buckets == NULL)) + && (addr[i].wc_tail == NULL + || addr[i].wc_tail->hash.buckets == NULL) +#if (NGX_PCRE) + && addr[i].nregex == 0 +#endif + ) { continue; }