# HG changeset patch # User Ruslan Ermilov # Date 1356079612 0 # Node ID f091722acab4bfb6950cd81be5133f5284df639b # Parent 76dacc97f23cf4a1c950effef9cd8c7ea900e1ba Geo: ensure that default entry is always present. If 0.0.0.0/32 entry was present and there was no explicit "default", we failed to add an empty string as a default value. diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -453,16 +453,14 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_c ngx_destroy_pool(ctx.temp_pool); ngx_destroy_pool(pool); - if (ngx_radix32tree_find(ctx.tree, 0) != NGX_RADIX_NO_VALUE) { - return rv; - } - if (ngx_radix32tree_insert(ctx.tree, 0, 0, (uintptr_t) &ngx_http_variable_null_value) == NGX_ERROR) { return NGX_CONF_ERROR; } + + /* NGX_BUSY is okay (default was set explicitly) */ } return rv;