Mercurial > hg > nginx-quic
comparison src/core/ngx_connection.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 | 67653855682e |
children | 484aec758d2c |
comparison
equal
deleted
inserted
replaced
4770:4e842583c890 | 4771:bdcdbdf35b52 |
---|---|
334 return NGX_ERROR; | 334 return NGX_ERROR; |
335 } | 335 } |
336 | 336 |
337 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) | 337 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY) |
338 | 338 |
339 if (ls[i].sockaddr->sa_family == AF_INET6 && ls[i].ipv6only) { | 339 if (ls[i].sockaddr->sa_family == AF_INET6) { |
340 int ipv6only; | 340 int ipv6only; |
341 | 341 |
342 ipv6only = (ls[i].ipv6only == 1); | 342 ipv6only = ls[i].ipv6only; |
343 | 343 |
344 if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, | 344 if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, |
345 (const void *) &ipv6only, sizeof(int)) | 345 (const void *) &ipv6only, sizeof(int)) |
346 == -1) | 346 == -1) |
347 { | 347 { |