From f927ab882a343799b0a9dec2e3240d34d60cca1c Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Tue, 23 Aug 2016 15:59:06 +0300 Subject: 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). --- src/http/modules/ngx_http_geo_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/http/modules') diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c index af061af81..e64380401 100644 --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -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; -- cgit