Klaus Demo nginx / b9c226a
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). Maxim Dounin 10 years ago
1 changed file(s) with 9 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
350350 ngx_http_access_loc_conf_t *prev = parent;
351351 ngx_http_access_loc_conf_t *conf = child;
352352
353 #if (NGX_HAVE_INET6)
354
355 if (conf->rules == NULL && conf->rules6 == NULL) {
356 conf->rules = prev->rules;
357 conf->rules6 = prev->rules6;
358 }
359
360 #else
361
353362 if (conf->rules == NULL) {
354363 conf->rules = prev->rules;
355364 }
356365
357 #if (NGX_HAVE_INET6)
358 if (conf->rules6 == NULL) {
359 conf->rules6 = prev->rules6;
360 }
361366 #endif
362367
363368 return NGX_CONF_OK;