Klaus Demo nginx / 0a961a0
Modules compatibility: removed unneeded IPV6_V6ONLY checks. The IPV6_V6ONLY macro is now checked only while parsing appropriate flag and when using the macro. The ipv6only field in listen structures is always initialized to 1, even if not supported on a given platform. This is expected to prevent a module compiled without IPV6_V6ONLY from accidentally creating dual sockets if loaded into main binary with proper IPV6_V6ONLY support. Maxim Dounin 5 years ago
11 changed file(s) with 10 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
6565 unsigned addr_ntop:1;
6666 unsigned wildcard:1;
6767
68 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
68 #if (NGX_HAVE_INET6)
6969 unsigned ipv6only:1;
7070 #endif
7171 #if (NGX_HAVE_REUSEPORT)
7070 #define NGX_MODULE_SIGNATURE_8 "0"
7171 #endif
7272
73 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
7473 #define NGX_MODULE_SIGNATURE_9 "1"
75 #else
76 #define NGX_MODULE_SIGNATURE_9 "0"
77 #endif
7874
7975 #if (NGX_HAVE_REUSEPORT)
8076 #define NGX_MODULE_SIGNATURE_10 "1"
17551755 ls->deferred_accept = addr->opt.deferred_accept;
17561756 #endif
17571757
1758 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
1758 #if (NGX_HAVE_INET6)
17591759 ls->ipv6only = addr->opt.ipv6only;
17601760 #endif
17611761
39383938 lsopt.fastopen = -1;
39393939 #endif
39403940 lsopt.wildcard = u.wildcard;
3941 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
3941 #if (NGX_HAVE_INET6)
39423942 lsopt.ipv6only = 1;
39433943 #endif
39443944
6868 unsigned ssl:1;
6969 #endif
7070 unsigned http2:1;
71 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
71 #if (NGX_HAVE_INET6)
7272 unsigned ipv6only:1;
7373 #endif
7474 #if (NGX_HAVE_REUSEPORT)
340340 ls->keepcnt = addr[i].opt.tcp_keepcnt;
341341 #endif
342342
343 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
343 #if (NGX_HAVE_INET6)
344344 ls->ipv6only = addr[i].opt.ipv6only;
345345 #endif
346346
3737 #if (NGX_MAIL_SSL)
3838 unsigned ssl:1;
3939 #endif
40 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
40 #if (NGX_HAVE_INET6)
4141 unsigned ipv6only:1;
4242 #endif
4343 unsigned so_keepalive:2;
352352 ls->wildcard = u.wildcard;
353353 ls->ctx = cf->ctx;
354354
355 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
355 #if (NGX_HAVE_INET6)
356356 ls->ipv6only = 1;
357357 #endif
358358
505505 ls->keepcnt = addr[i].opt.tcp_keepcnt;
506506 #endif
507507
508 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
508 #if (NGX_HAVE_INET6)
509509 ls->ipv6only = addr[i].opt.ipv6only;
510510 #endif
511511
5151 #if (NGX_STREAM_SSL)
5252 unsigned ssl:1;
5353 #endif
54 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
54 #if (NGX_HAVE_INET6)
5555 unsigned ipv6only:1;
5656 #endif
5757 #if (NGX_HAVE_REUSEPORT)
623623 ls->wildcard = u.wildcard;
624624 ls->ctx = cf->ctx;
625625
626 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
626 #if (NGX_HAVE_INET6)
627627 ls->ipv6only = 1;
628628 #endif
629629