mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
fix a geo range if the range includes two or more /16 networks
and does not begin at /16 network boundary
This commit is contained in:
parent
146324618d
commit
bd4b6e68af
@ -589,7 +589,7 @@ ngx_http_geo_add_range(ngx_conf_t *cf, ngx_http_geo_conf_ctx_t *ctx,
|
|||||||
ngx_array_t *a;
|
ngx_array_t *a;
|
||||||
ngx_http_geo_range_t *range;
|
ngx_http_geo_range_t *range;
|
||||||
|
|
||||||
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 New Issue
Block a user