comparison src/http/ngx_http_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 1c5e2e4d5b35
children b07931054bf1
comparison
equal deleted inserted replaced
4770:4e842583c890 4771:bdcdbdf35b52
3910 lsopt.sndbuf = -1; 3910 lsopt.sndbuf = -1;
3911 #if (NGX_HAVE_SETFIB) 3911 #if (NGX_HAVE_SETFIB)
3912 lsopt.setfib = -1; 3912 lsopt.setfib = -1;
3913 #endif 3913 #endif
3914 lsopt.wildcard = u.wildcard; 3914 lsopt.wildcard = u.wildcard;
3915 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
3916 lsopt.ipv6only = 1;
3917 #endif
3915 3918
3916 (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr, 3919 (void) ngx_sock_ntop(&lsopt.u.sockaddr, lsopt.addr,
3917 NGX_SOCKADDR_STRLEN, 1); 3920 NGX_SOCKADDR_STRLEN, 1);
3918 3921
3919 for (n = 2; n < cf->args->nelts; n++) { 3922 for (n = 2; n < cf->args->nelts; n++) {
4029 4032
4030 if (ngx_strcmp(&value[n].data[10], "n") == 0) { 4033 if (ngx_strcmp(&value[n].data[10], "n") == 0) {
4031 lsopt.ipv6only = 1; 4034 lsopt.ipv6only = 1;
4032 4035
4033 } else if (ngx_strcmp(&value[n].data[10], "ff") == 0) { 4036 } else if (ngx_strcmp(&value[n].data[10], "ff") == 0) {
4034 lsopt.ipv6only = 2; 4037 lsopt.ipv6only = 0;
4035 4038
4036 } else { 4039 } else {
4037 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 4040 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
4038 "invalid ipv6only flags \"%s\"", 4041 "invalid ipv6only flags \"%s\"",
4039 &value[n].data[9]); 4042 &value[n].data[9]);