changeset 3582:24e7bf1abbe5 stable-0.7

merge r3457: fix a geo range if the range includes two or more /16 networks and does not begin at /16 network boundary
author Igor Sysoev <igor@sysoev.ru>
date Mon, 07 Jun 2010 10:04:13 +0000
parents 17995396463d
children d513f9d30208
files src/http/modules/ngx_http_geo_module.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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, n
     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;