diff src/mail/ngx_mail_core_module.c @ 682:5cb5db9975ba NGINX_1_3_4

nginx 1.3.4 *) Change: the "ipv6only" parameter is now turned on by default for listening IPv6 sockets. *) Feature: the Clang compiler support. *) Bugfix: extra listening sockets might be created. Thanks to Roman Odaisky. *) Bugfix: nginx/Windows might hog CPU if a worker process failed to start. Thanks to Ricardo Villalobos Guevara. *) Bugfix: the "proxy_pass_header", "fastcgi_pass_header", "scgi_pass_header", "uwsgi_pass_header", "proxy_hide_header", "fastcgi_hide_header", "scgi_hide_header", and "uwsgi_hide_header" directives might be inherited incorrectly.
author Igor Sysoev <http://sysoev.ru>
date Tue, 31 Jul 2012 00:00:00 +0400
parents bf8b55a5ac89
children 660139fd80ca
line wrap: on
line diff
--- a/src/mail/ngx_mail_core_module.c
+++ b/src/mail/ngx_mail_core_module.c
@@ -374,6 +374,10 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx
     ls->wildcard = u.wildcard;
     ls->ctx = cf->ctx;
 
+#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
+    ls->ipv6only = 1;
+#endif
+
     for (m = 0; ngx_modules[m]; m++) {
         if (ngx_modules[m]->type != NGX_MAIL_MODULE) {
             continue;
@@ -413,7 +417,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx
                     ls->ipv6only = 1;
 
                 } else if (ngx_strcmp(&value[i].data[10], "ff") == 0) {
-                    ls->ipv6only = 2;
+                    ls->ipv6only = 0;
 
                 } else {
                     ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,