Mercurial > hg > nginx-quic
changeset 4580:ae60a1085c82
Access module: fixed inheritance of allow/deny ipv6 rules.
Previous (incorrect) behaviour was to inherit ipv6 rules separately from
ipv4 ones. Now all rules are either inherited (if there are no rules
defined at current level) or not (if there are any rules defined).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 10 Apr 2012 13:25:53 +0000 |
parents | 778ea2f7268c |
children | f84a98a03d0d |
files | src/http/modules/ngx_http_access_module.c |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_access_module.c +++ b/src/http/modules/ngx_http_access_module.c @@ -351,14 +351,19 @@ ngx_http_access_merge_loc_conf(ngx_conf_ ngx_http_access_loc_conf_t *prev = parent; ngx_http_access_loc_conf_t *conf = child; +#if (NGX_HAVE_INET6) + + if (conf->rules == NULL && conf->rules6 == NULL) { + conf->rules = prev->rules; + conf->rules6 = prev->rules6; + } + +#else + if (conf->rules == NULL) { conf->rules = prev->rules; } -#if (NGX_HAVE_INET6) - if (conf->rules6 == NULL) { - conf->rules6 = prev->rules6; - } #endif return NGX_CONF_OK;