mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 12:22:41 +08:00
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
36e1c887db
commit
f927ab882a
@ -966,7 +966,7 @@ ngx_http_geo_delete_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
|
||||
|
||||
warn = 0;
|
||||
|
||||
for (n = start; n <= end; n += 0x10000) {
|
||||
for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {
|
||||
|
||||
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;
|
||||
|
||||
for (n = start; n <= end; n += 0x10000) {
|
||||
for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {
|
||||
|
||||
h = n >> 16;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user