]> git.kaiwu.me - nginx.git/commitdiff
merge r3659, r3825, r3826:
authorIgor Sysoev <igor@sysoev.ru>
Tue, 14 Dec 2010 19:19:07 +0000 (19:19 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 14 Dec 2010 19:19:07 +0000 (19:19 +0000)
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

src/core/ngx_cycle.c
src/http/ngx_http.c

index cb551e945c2a1e4c87d6f22c191bd30f92de5147..3d4df5d01869a5647ccf20d03e6513ba428a1d72 100644 (file)
@@ -847,7 +847,7 @@ ngx_cmp_sockaddr(struct sockaddr *sa1, struct sockaddr *sa2)
         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;
         }
 
index f5cb430faf9766318e12953b0b1fb6d5e4b0951b..3ac3eb617d880c28c528fd2cd9584c12239612e4 100644 (file)
@@ -1831,8 +1831,12 @@ ngx_http_add_addrs6(ngx_conf_t *cf, ngx_http_port_t *hport,
         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;
         }