diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/ngx_connection.c | 4 | ||||
| -rw-r--r-- | src/core/ngx_connection.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index ba1b3f9e2..660e0af4a 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -336,10 +336,10 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle) #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) - if (ls[i].sockaddr->sa_family == AF_INET6 && ls[i].ipv6only) { + if (ls[i].sockaddr->sa_family == AF_INET6) { int ipv6only; - ipv6only = (ls[i].ipv6only == 1); + ipv6only = ls[i].ipv6only; if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (const void *) &ipv6only, sizeof(int)) diff --git a/src/core/ngx_connection.h b/src/core/ngx_connection.h index 34af12e4f..87fd08723 100644 --- a/src/core/ngx_connection.h +++ b/src/core/ngx_connection.h @@ -64,7 +64,7 @@ struct ngx_listening_s { unsigned addr_ntop:1; #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) - unsigned ipv6only:2; + unsigned ipv6only:1; #endif unsigned keepalive:2; |
