Piotr Sikora
7e7589e746
Style: add whitespace between control statement and parentheses.
...
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2014-07-08 03:03:13 -07:00
Maxim Dounin
e3cab76758
Backed out f1a91825730a and 7094bd12c1ff.
...
While ngx_get_full_name() might have a bit more descriptive arguments,
the ngx_conf_full_name() is generally easier to use when parsing
configuration and limits exposure of cycle->prefix / cycle->conf_prefix
details.
2013-08-20 21:11:19 +04:00
Valentin Bartenev
d29d21bade
Replaced ngx_conf_full_name() with ngx_get_full_name().
...
The ngx_get_full_name() function takes more readable arguments list.
2013-08-06 19:58:40 +04:00
Ruslan Ermilov
56fce56f4f
Use NGX_DEFAULT_POOL_SIZE macro where appropriate.
2013-03-21 16:03:24 +00:00
Ruslan Ermilov
67a68720b7
Correctly handle multiple X-Forwarded-For headers (ticket #106 ).
2013-02-27 13:29:50 +00:00
Ruslan Ermilov
92d571dd71
Geo: improved code readability.
2012-12-27 21:35:47 +00:00
Ruslan Ermilov
f2c8704fd0
Geo: made "default" affect both IPv4 and IPv6 when using prefixes.
...
Previously, "default" was equivalent to specifying 0.0.0.0/0, now
it's equivalent to specifying both 0.0.0.0/0 and ::/0 (if support
for IPv6 is enabled) with the same value.
2012-12-26 05:03:51 +00:00
Ruslan Ermilov
98129de874
Geo: properly initialize ngx_cidr_t when dealing with "default".
2012-12-25 10:00:39 +00:00
Ruslan Ermilov
3d87688bc6
Geo: IPv6 support.
...
The "ranges" mode is still limited to IPv4 only.
2012-12-25 08:21:56 +00:00
Ruslan Ermilov
2189c87aa7
Trailing whitespace fix.
2012-12-24 16:40:55 +00:00
Ruslan Ermilov
f1819242fc
Geo: ensure that default entry is always present.
...
If 0.0.0.0/32 entry was present and there was no explicit "default",
we failed to add an empty string as a default value.
2012-12-21 08:46:52 +00:00
Ruslan Ermilov
a0caa70c98
There's no need to normalize address returned by ngx_ptocidr().
2012-12-21 08:44:39 +00:00
Ruslan Ermilov
c865f8dfa2
Added checks that disallow adding a variable with an empty name.
...
Added variable name syntax checks to "geo" and "map" directives.
2012-12-17 19:03:33 +00:00
Ruslan Ermilov
18a7e1b359
Geo: fixed the "ranges" without ranges case.
...
The following configuration returned an empty value for $geo:
geo $geo {
ranges;
default default;
}
2012-12-14 19:56:03 +00:00
Ruslan Ermilov
cd04ca3546
Geo: improved ngx_http_geo_block() code readability.
2012-12-14 19:35:37 +00:00
Ruslan Ermilov
ba290091cf
Fixed variable syntax checking in "set", "geo", "limit_conn_zone",
...
and "perl_set" directives.
2012-12-13 15:05:19 +00:00
Ruslan Ermilov
d469482cda
Fixed strict aliasing bugs when dealing with IPv4-mapped IPv6 addresses
...
(closes #201 ).
2012-08-30 14:58:11 +00:00
Maxim Dounin
5425263436
Geo: fixed handling of ranges without default set.
...
The bug had appeared in 0.8.43 (r3653). Patch by Weibin Yao.
2012-08-16 13:01:41 +00:00
Ruslan Ermilov
d4353c6fd3
Fixed spelling of "endianness", and called it "byte ordering" in the
...
user visible part.
2012-06-08 09:41:55 +00:00
Ruslan Ermilov
69521ddebf
geo: chains of trusted proxies and partial IPv6 support.
...
The module now supports recursive search of client address through
the chain of trusted proxies, controlled by the "proxy_recursive"
directive in the "geo" block. It also gets partial IPv6 support:
now proxies may be specified with IPv6 addresses.
Example:
geo $test {
...
proxy 127.0.0.1;
proxy ::1;
proxy_recursive;
}
There's also a slight change in behavior. When original client
address (as specified by the "geo" directive) is one of the
trusted proxies, and the value of the X-Forwarded-For request
header cannot not be parsed as a valid address, an original client
address will be used for lookup. Previously, 255.255.255.255 was
used in this case.
2012-05-14 13:53:22 +00:00
Ruslan Ermilov
43d2b1c045
Fixed grammar in error messages.
2012-04-12 19:35:41 +00:00
Maxim Konovalov
f8d59e33f3
Copyright updated.
2012-01-18 15:07:43 +00:00
Igor Sysoev
529b5f1938
support IPv4 mapped to IPv6 in geo module
2011-05-16 13:54:42 +00:00
Igor Sysoev
d63104eea4
use memmove() in appropriate places
2011-04-12 08:02:46 +00:00
Igor Sysoev
178cd2da2b
style fix: remove tabs
2010-06-30 14:28:54 +00:00
Igor Sysoev
ffcc2f4a9e
test binary geo range base size
2010-06-30 10:13:51 +00:00
Igor Sysoev
3b0ddc2097
test the second binary geo range base existence
2010-06-30 10:12:46 +00:00
Igor Sysoev
e3d88fb8eb
test binary geo ranges base only for ranges
2010-06-30 10:05:56 +00:00
Igor Sysoev
4655c721e8
test binary gep range base mtime
2010-06-30 10:02:05 +00:00
Igor Sysoev
edf29ef8cd
binary geo ranges base cache
2010-06-29 16:06:20 +00:00
Igor Sysoev
325bd4ea98
change duplicate default geo range processing
2010-06-29 13:36:16 +00:00
Igor Sysoev
70485d6b7c
eliminate a number of ranges: about 18,000 /16 networks are empty,
...
this change saves about 70K/140K on 32/64-bit platforms
2010-06-24 15:26:05 +00:00
Igor Sysoev
e3693e3b37
break cycle early
2010-06-24 13:16:19 +00:00
Igor Sysoev
aa6936e61a
style fix
2010-06-23 16:34:54 +00:00
Igor Sysoev
0923d08148
change ngx_http_variable_value_node_t to more generic ngx_str_node_t
2010-06-23 15:31:33 +00:00
Igor Sysoev
bd4b6e68af
fix a geo range if the range includes two or more /16 networks
...
and does not begin at /16 network boundary
2010-02-25 17:26:01 +00:00
Igor Sysoev
e0f1d0afcc
style fix
2009-09-11 13:57:50 +00:00
Igor Sysoev
15e3b01819
geo module supports trusted proxies
2009-07-22 09:43:14 +00:00
Igor Sysoev
36860101ec
prepare ngx_ptocidr() for IPv6
2009-02-24 14:01:40 +00:00
Igor Sysoev
a35eaccdec
a prelimiary IPv6 support, HTTP listen
2009-02-21 07:02:02 +00:00
Igor Sysoev
cd55a93cce
fix segfault when geo range replaces starting part of another range
2009-01-19 16:42:14 +00:00
Igor Sysoev
c1a2b978de
allow insertion range if its start or end is the same as existent one
2009-01-16 16:29:23 +00:00
Igor Sysoev
53554ae54d
fix single address range
2009-01-16 16:09:58 +00:00
Igor Sysoev
6ff8cda061
fix range deletion
2009-01-16 16:02:30 +00:00
Igor Sysoev
95cff3e9d0
repeat r2448 for range deletion
2009-01-16 15:58:27 +00:00
Igor Sysoev
287c22f788
log both overrlaped ranges
2009-01-16 15:47:05 +00:00
Igor Sysoev
f8fdbcaaa2
fix range start for ranges those spread in two or more slots
2009-01-16 15:44:39 +00:00
Igor Sysoev
73f9bb4d01
*) fix duplicate geo ranges
...
*) split existent range and insert a new one
2009-01-16 13:17:12 +00:00
Igor Sysoev
2d83ed000f
style fix: remove tabs
2008-12-11 10:22:25 +00:00
Igor Sysoev
9a1d46684c
$geo variable support
2008-12-11 09:46:45 +00:00