Geo: fixed removing a range in certain cases.
If the range includes two or more /16 networks and does not start at the /16 boundary, the last subrange was not removed (see 91cff7f97a50 for details).
This commit is contained in:
parent
fd044c8ce8
commit
73f9b84fa9
2 changed files with 2 additions and 2 deletions
|
@ -966,7 +966,7 @@ ngx_http_geo_delete_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
|
||||||
|
|
||||||
warn = 0;
|
warn = 0;
|
||||||
|
|
||||||
for (n = start; n <= end; n += 0x10000) {
|
for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {
|
||||||
|
|
||||||
h = n >> 16;
|
h = n >> 16;
|
||||||
|
|
||||||
|
|
|
@ -916,7 +916,7 @@ ngx_stream_geo_delete_range(ngx_conf_t *cf, ngx_stream_geo_conf_ctx_t *ctx,
|
||||||
|
|
||||||
warn = 0;
|
warn = 0;
|
||||||
|
|
||||||
for (n = start; n <= end; n += 0x10000) {
|
for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {
|
||||||
|
|
||||||
h = n >> 16;
|
h = n >> 16;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue