Changeset 6719:cebf5fed00bf in nginx


Ignore:
Timestamp:
10/03/16 12:58:25 (3 years ago)
Author:
Maxim Dounin <mdounin@…>
Branch:
default
Phase:
public
Message:

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.

Location:
src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • src/core/ngx_connection.h

    r6602 r6719  
    6767    unsigned            wildcard:1;
    6868
    69 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     69#if (NGX_HAVE_INET6)
    7070    unsigned            ipv6only:1;
    7171#endif
  • src/core/ngx_module.h

    r6718 r6719  
    7272#endif
    7373
    74 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
    7574#define NGX_MODULE_SIGNATURE_9   "1"
    76 #else
    77 #define NGX_MODULE_SIGNATURE_9   "0"
    78 #endif
    7975
    8076#if (NGX_HAVE_REUSEPORT)
  • src/http/ngx_http.c

    r6593 r6719  
    17571757#endif
    17581758
    1759 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     1759#if (NGX_HAVE_INET6)
    17601760    ls->ipv6only = addr->opt.ipv6only;
    17611761#endif
  • src/http/ngx_http_core_module.c

    r6683 r6719  
    39403940#endif
    39413941    lsopt.wildcard = u.wildcard;
    3942 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     3942#if (NGX_HAVE_INET6)
    39433943    lsopt.ipv6only = 1;
    39443944#endif
  • src/http/ngx_http_core_module.h

    r6718 r6719  
    7070#endif
    7171    unsigned                   http2:1;
    72 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     72#if (NGX_HAVE_INET6)
    7373    unsigned                   ipv6only:1;
    7474#endif
  • src/mail/ngx_mail.c

    r6593 r6719  
    342342#endif
    343343
    344 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     344#if (NGX_HAVE_INET6)
    345345            ls->ipv6only = addr[i].opt.ipv6only;
    346346#endif
  • src/mail/ngx_mail.h

    r6657 r6719  
    3939    unsigned                ssl:1;
    4040#endif
    41 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     41#if (NGX_HAVE_INET6)
    4242    unsigned                ipv6only:1;
    4343#endif
  • src/mail/ngx_mail_core_module.c

    r6657 r6719  
    354354    ls->ctx = cf->ctx;
    355355
    356 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     356#if (NGX_HAVE_INET6)
    357357    ls->ipv6only = 1;
    358358#endif
  • src/stream/ngx_stream.c

    r6694 r6719  
    507507#endif
    508508
    509 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     509#if (NGX_HAVE_INET6)
    510510            ls->ipv6only = addr[i].opt.ipv6only;
    511511#endif
  • src/stream/ngx_stream.h

    r6711 r6719  
    5353    unsigned                       ssl:1;
    5454#endif
    55 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     55#if (NGX_HAVE_INET6)
    5656    unsigned                       ipv6only:1;
    5757#endif
  • src/stream/ngx_stream_core_module.c

    r6694 r6719  
    625625    ls->ctx = cf->ctx;
    626626
    627 #if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
     627#if (NGX_HAVE_INET6)
    628628    ls->ipv6only = 1;
    629629#endif
Note: See TracChangeset for help on using the changeset viewer.