diff options
author | Igor Sysoev <igor@sysoev.ru> | 2010-02-25 17:26:01 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2010-02-25 17:26:01 +0000 |
commit | bd4b6e68af1e8f6b61ec7dbf8e11064a56ba4ba8 (patch) | |
tree | d39b18572da9b320bb68c42cf008c583d0f9e8df /src | |
parent | 146324618d4b407b2c212949680ac6e66af14092 (diff) | |
download | nginx-bd4b6e68af1e8f6b61ec7dbf8e11064a56ba4ba8.tar.gz nginx-bd4b6e68af1e8f6b61ec7dbf8e11064a56ba4ba8.zip |
fix a geo range if the range includes two or more /16 networks
and does not begin at /16 network boundary
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_geo_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index 0ec8d093b..a184a7ae3 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -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_http_geo_range_t *range; - for (n = start; n <= end; n += 0x10000) { + for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) { h = n >> 16; |