mirror of
https://github.com/nginx/nginx.git
synced 2026-06-26 11:52:00 +00:00
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.
This commit is contained in:
parent
a0caa70c98
commit
f1819242fc
1 changed files with 2 additions and 4 deletions
|
|
@ -453,16 +453,14 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue