# HG changeset patch # User Igor Sysoev # Date 1232120679 0 # Node ID 3d868fc44879e0df77171ec540da5d65bb1488ad # Parent 6fd7d9c3218d00bb7a9c00740d1a30ff797af5f7 fix range start for ranges those spread in two or more slots diff --git a/src/http/modules/ngx_http_geo_module.c b/src/http/modules/ngx_http_geo_module.c --- a/src/http/modules/ngx_http_geo_module.c +++ b/src/http/modules/ngx_http_geo_module.c @@ -521,7 +521,12 @@ ngx_http_geo_add_range(ngx_conf_t *cf, n for (n = start; n < end; n += 0x10000) { h = n >> 16; - s = n & 0xffff; + + if (n == start) { + s = n & 0xffff; + } else { + s = 0; + } if ((n | 0xffff) > end) { e = end & 0xffff;