Mercurial > hg > nginx
comparison src/http/modules/ngx_http_geo_module.c @ 6662:1301a58b5dac
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).
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 23 Aug 2016 15:59:06 +0300 |
parents | ec141a44641b |
children | 53198d9bf84f |
comparison
equal
deleted
inserted
replaced
6661:ec141a44641b | 6662:1301a58b5dac |
---|---|
964 ngx_array_t *a; | 964 ngx_array_t *a; |
965 ngx_http_geo_range_t *range; | 965 ngx_http_geo_range_t *range; |
966 | 966 |
967 warn = 0; | 967 warn = 0; |
968 | 968 |
969 for (n = start; n <= end; n += 0x10000) { | 969 for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) { |
970 | 970 |
971 h = n >> 16; | 971 h = n >> 16; |
972 | 972 |
973 if (n == start) { | 973 if (n == start) { |
974 s = n & 0xffff; | 974 s = n & 0xffff; |