Mercurial > hg > nginx
comparison src/mail/ngx_mail_core_module.c @ 4771:bdcdbdf35b52
Core: ipv6only is now on by default.
There is a general consensus that this change results in better
consistency between different operating systems and differently
tuned operating systems.
Note: this changes the width and meaning of the ipv6only field
of the ngx_listening_t structure. 3rd party modules that create
their own listening sockets might need fixing.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 30 Jul 2012 12:27:06 +0000 |
parents | 14411ee4d89f |
children | 5c47ecaef07a |
comparison
equal
deleted
inserted
replaced
4770:4e842583c890 | 4771:bdcdbdf35b52 |
---|---|
372 | 372 |
373 ls->socklen = u.socklen; | 373 ls->socklen = u.socklen; |
374 ls->wildcard = u.wildcard; | 374 ls->wildcard = u.wildcard; |
375 ls->ctx = cf->ctx; | 375 ls->ctx = cf->ctx; |
376 | 376 |
377 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) | |
378 ls->ipv6only = 1; | |
379 #endif | |
380 | |
377 for (m = 0; ngx_modules[m]; m++) { | 381 for (m = 0; ngx_modules[m]; m++) { |
378 if (ngx_modules[m]->type != NGX_MAIL_MODULE) { | 382 if (ngx_modules[m]->type != NGX_MAIL_MODULE) { |
379 continue; | 383 continue; |
380 } | 384 } |
381 | 385 |
411 | 415 |
412 if (ngx_strcmp(&value[i].data[10], "n") == 0) { | 416 if (ngx_strcmp(&value[i].data[10], "n") == 0) { |
413 ls->ipv6only = 1; | 417 ls->ipv6only = 1; |
414 | 418 |
415 } else if (ngx_strcmp(&value[i].data[10], "ff") == 0) { | 419 } else if (ngx_strcmp(&value[i].data[10], "ff") == 0) { |
416 ls->ipv6only = 2; | 420 ls->ipv6only = 0; |
417 | 421 |
418 } else { | 422 } else { |
419 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 423 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
420 "invalid ipv6only flags \"%s\"", | 424 "invalid ipv6only flags \"%s\"", |
421 &value[i].data[9]); | 425 &value[i].data[9]); |