summaryrefslogtreecommitdiffhomepage
path: root/src/http/modules/ngx_http_geo_module.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2013-02-11Merge of r4993, r4994, r4997, r5000: geo ipv6 support.Maxim Dounin1-88/+281
*) Geo: IPv6 support. The "ranges" mode is still limited to IPv4 only. *) Geo: properly initialize ngx_cidr_t when dealing with "default". *) 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. *) Geo: improved code readability.
2013-02-11Merge of r4968, r4969, r4977, r4980, r4981, r4990: geo fixes.Maxim Dounin1-23/+23
*) Geo: improved ngx_http_geo_block() code readability. *) Geo: fixed the "ranges" without ranges case. The following configuration returned an empty value for $geo: geo $geo { ranges; default default; } *) Fixed return type of internal function that allocates radix tree nodes. *) There's no need to normalize address returned by ngx_ptocidr(). *) 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. *) Trailing whitespace fix.
2013-02-10Merge of r4948, r4949, r4964, r4973, r5011: variables.Maxim Dounin1-0/+14
*) Allow the complex value to be defined as an empty string. This makes conversion from strings to complex values possible without the loss of functionality. *) The "auth_basic" directive gained support of variables. *) Fixed variable syntax checking in "set", "geo", "limit_conn_zone", and "perl_set" directives. *) Added checks that disallow adding a variable with an empty name. Added variable name syntax checks to "geo" and "map" directives. *) Variables $pipe, $request_length, $time_iso8601, and $time_local. Log module counterparts are preserved for efficiency. Based on patch by Kiril Kalchev.
2012-09-24Merge of r4829: fixed strict aliasing with ipv6 (ticket #201).Maxim Dounin1-1/+10
Fixed strict aliasing bugs when dealing with IPv4-mapped IPv6 addresses.
2012-09-24Merge of r4817: geo: fixed handling of ranges without default set.Maxim Dounin1-4/+4
The bug had appeared in 0.8.43 (r3653). Patch by Weibin Yao.
2012-07-02Merge of r4682, r4694, r4699, r4704, r4705: minor nits.Maxim Dounin1-1/+1
*) Fixed spelling of "endianness", and called it "byte ordering" in the user visible part. *) Fixed return type of ngx_strerror_init(). *) Fixed a harmless error in spelling of "Connection: close" when computing the response header length. *) Style. *) Added code to look up Google perftools in /opt/local/, for MacPorts.
2012-06-04Merge of r4614, r4624-r4629, r4631: proxy recursive changes.Maxim Dounin1-74/+62
*) Added IPv6 and UNIX-domain socket support in "debug_connection" directive. *) New function ngx_http_get_forwarded_addr() to look up real client address. On input it takes an original address, string in the X-Forwarded-For format and its length, list of trusted proxies, and a flag indicating to perform the recursive search. On output it returns NGX_OK and the "deepest" valid address in a chain, or NGX_DECLINED. It supports AF_INET and AF_INET6. Additionally, original address and/or proxy may be specified as AF_UNIX. *) Realip: chains of trusted proxies and IPv6 support. The module now supports recursive search of client address through the chain of trusted proxies, controlled by the "real_ip_recursive" directive (closes #2). It also gets full IPv6 support (closes #44) and canonical value of the $client_addr variable on address change. Example: real_ip_header X-Forwarded-For; set_real_ip_from 127.0.0.0/8; set_real_ip_from ::1; set_real_ip_from unix:; real_ip_recursive on; *) 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. *) Geoip: trusted proxies support and partial IPv6 support. The module now supports recursive search of client address through the chain of trusted proxies (closes #100), in the same scope as the geo module. Proxies are listed by the "geoip_proxy" directive, recursive search is enabled by the "geoip_proxy_recursive" directive. IPv6 is partially supported: proxies may be specified with IPv6 addresses. Example: geoip_country .../GeoIP.dat; geoip_proxy 127.0.0.1; geoip_proxy ::1; geoip_proxy 10.0.0.0/8; geoip_proxy_recursive on;
2012-04-12Fixed grammar in error messages.Ruslan Ermilov1-3/+3
2012-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-05-16support IPv4 mapped to IPv6 in geo moduleIgor Sysoev1-4/+28
2011-04-12use memmove() in appropriate placesIgor Sysoev1-5/+5
2010-06-30style fix: remove tabsIgor Sysoev1-10/+10
2010-06-30test binary geo range base sizeIgor Sysoev1-1/+1
2010-06-30test the second binary geo range base existenceIgor Sysoev1-0/+8
2010-06-30test binary geo ranges base only for rangesIgor Sysoev1-9/+11
2010-06-30test binary gep range base mtimeIgor Sysoev1-1/+20
2010-06-29binary geo ranges base cacheIgor Sysoev1-52/+407
2010-06-29change duplicate default geo range processingIgor Sysoev1-12/+9
2010-06-24eliminate a number of ranges: about 18,000 /16 networks are empty,Igor Sysoev1-27/+22
this change saves about 70K/140K on 32/64-bit platforms
2010-06-24break cycle earlyIgor Sysoev1-2/+2
2010-06-23style fixIgor Sysoev1-2/+2
2010-06-23change ngx_http_variable_value_node_t to more generic ngx_str_node_tIgor Sysoev1-14/+22
2010-02-25fix a geo range if the range includes two or more /16 networksIgor Sysoev1-1/+1
and does not begin at /16 network boundary
2009-09-11style fixIgor Sysoev1-1/+1
2009-07-22geo module supports trusted proxiesIgor Sysoev1-27/+130
2009-02-24prepare ngx_ptocidr() for IPv6Igor Sysoev1-12/+19
2009-02-21a prelimiary IPv6 support, HTTP listenIgor Sysoev1-0/+4
2009-01-19fix segfault when geo range replaces starting part of another rangeIgor Sysoev1-2/+2
2009-01-16allow insertion range if its start or end is the same as existent oneIgor Sysoev1-0/+48
2009-01-16fix single address rangeIgor Sysoev1-2/+2
2009-01-16fix range deletionIgor Sysoev1-0/+3
2009-01-16repeat r2448 for range deletionIgor Sysoev1-1/+6
2009-01-16log both overrlaped rangesIgor Sysoev1-1/+7
2009-01-16fix range start for ranges those spread in two or more slotsIgor Sysoev1-1/+6
2009-01-16*) fix duplicate geo rangesIgor Sysoev1-4/+44
*) split existent range and insert a new one
2008-12-11style fix: remove tabsIgor Sysoev1-12/+12
2008-12-11$geo variable supportIgor Sysoev1-56/+122
2008-12-11remove before nginx-0.1.25 compatibility codeIgor Sysoev1-13/+2
2008-12-02fix "delete CIDR"Igor Sysoev1-1/+2
2008-11-28create empty radix tree for "geo $geo { }" caseIgor Sysoev1-0/+7
2008-11-25*) descrease geo configuration memory usageIgor Sysoev1-75/+532
*) geo delete *) geo ranges
2008-11-22use value rbtree instead of array in geo configurationIgor Sysoev1-42/+34
2007-10-14fix English grammarIgor Sysoev1-2/+2
2007-08-20use %v for ngx_variable_value_t in ngx_sprintf(),Igor Sysoev1-5/+4
this fixes nginx on FreeBSD/sparc64
2007-08-10ignore meaningless bits in CIDR and warn about themIgor Sysoev1-1/+9
2007-07-29--sysconfdir=DIRIgor Sysoev1-1/+1
2006-04-19nginx-0.3.40-RELEASE importrelease-0.3.40Igor Sysoev1-1/+1
*) Feature: the ngx_http_dav_module supports the MKCOL method. *) Feature: the "create_full_put_path" directive. *) Feature: the "$limit_rate" variable.
2005-12-16nginx-0.3.16-RELEASE importrelease-0.3.16Igor Sysoev1-24/+23
*) Feature: the ngx_http_map_module. *) Feature: the "types_hash_max_size" and "types_hash_bucket_size" directives. *) Feature: the "ssi_value_length" directive. *) Feature: the "worker_rlimit_core" directive. *) Workaround: the connection number in logs was always 1 if nginx was built by the icc 8.1 or 9.0 compilers with optimization for Pentium 4. *) Bugfix: the "config timefmt" SSI command set incorrect time format. *) Bugfix: nginx did not close connection to IMAP/POP3 backend for the SSL connections; the bug had appeared in 0.3.13. Thanks to Rob Mueller. *) Bugfix: segmentation fault may occurred in at SSL shutdown; the bug had appeared in 0.3.13.
2005-12-05nginx-0.3.13-RELEASE importrelease-0.3.13Igor Sysoev1-7/+3
*) Feature: the IMAP/POP3 proxy supports STARTTLS and STLS. *) Bugfix: the IMAP/POP3 proxy did not work with the select, poll, and /dev/poll methods. *) Bugfix: in SSI handling. *) Bugfix: now Solaris sendfilev() is not used to transfer the client request body to FastCGI-server via the unix domain socket. *) Bugfix: the "auth_basic" directive did not disable the authorization; the bug had appeared in 0.3.11.
2005-11-15nginx-0.3.10-RELEASE importrelease-0.3.10Igor Sysoev1-5/+2
*) Change: the "valid_referers" directive and the "$invalid_referer" variable were moved to the new ngx_http_referer_module from the ngx_http_rewrite_module. *) Change: the "$apache_bytes_sent" variable name was changed to "$body_bytes_sent". *) Feature: the "$sent_http_..." variables. *) Feature: the "if" directive supports the "=" and "!=" operations. *) Feature: the "proxy_pass" directive supports the HTTPS protocol. *) Feature: the "proxy_set_body" directive. *) Feature: the "post_action" directive. *) Feature: the ngx_http_empty_gif_module. *) Feature: the "worker_cpu_affinity" directive for Linux. *) Bugfix: the "rewrite" directive did not unescape URI part in redirect, now it is unescaped except the %00-%25 and %7F-%FF characters. *) Bugfix: nginx could not be built by the icc 9.0 compiler. *) Bugfix: if the SSI was enabled for zero size static file, then the chunked response was encoded incorrectly.