Welcome! Log In Create A New Profile

Advanced

[nginx] Geo: fixed removing a range in certain cases.

August 23, 2016 10:02AM
details: http://hg.nginx.org/nginx/rev/1301a58b5dac
branches:
changeset: 6662:1301a58b5dac
user: Ruslan Ermilov <ru@nginx.com>
date: Tue Aug 23 15:59:06 2016 +0300
description:
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).

diffstat:

src/http/modules/ngx_http_geo_module.c | 2 +-
src/stream/ngx_stream_geo_module.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r ec141a44641b -r 1301a58b5dac src/http/modules/ngx_http_geo_module.c
--- a/src/http/modules/ngx_http_geo_module.c Tue Aug 23 15:57:29 2016 +0300
+++ b/src/http/modules/ngx_http_geo_module.c Tue Aug 23 15:59:06 2016 +0300
@@ -966,7 +966,7 @@ ngx_http_geo_delete_range(ngx_conf_t *cf

warn = 0;

- for (n = start; n <= end; n += 0x10000) {
+ for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {

h = n >> 16;

diff -r ec141a44641b -r 1301a58b5dac src/stream/ngx_stream_geo_module.c
--- a/src/stream/ngx_stream_geo_module.c Tue Aug 23 15:57:29 2016 +0300
+++ b/src/stream/ngx_stream_geo_module.c Tue Aug 23 15:59:06 2016 +0300
@@ -916,7 +916,7 @@ ngx_stream_geo_delete_range(ngx_conf_t *

warn = 0;

- for (n = start; n <= end; n += 0x10000) {
+ for (n = start; n <= end; n = (n + 0x10000) & 0xffff0000) {

h = n >> 16;


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Geo: fixed removing a range in certain cases.

ru@nginx.com 570 August 23, 2016 10:02AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready