summaryrefslogtreecommitdiffhomepage
path: root/src/stream/ngx_stream_geoip_module.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2024-03-18Fixed undefined behaviour with IPv4-mapped IPv6 addresses.Sergey Kandaurov1-1/+1
Previously, it could result when left-shifting signed integer due to implicit integer promotion, such that the most significant bit appeared on the sign bit. In practice, though, this results in the same left value as with an explicit cast, at least on known compilers, such as GCC and Clang. The reason is that in_addr_t, which is equivalent to uint32_t and same as "unsigned int" in ILP32 and LP64 data type models, has the same type width as the intermediate after integer promotion, so there's no side effects such as sign-extension. This explains why adding an explicit cast does not change object files in practice. Found with UndefinedBehaviorSanitizer (shift). Based on a patch by Piotr Sikora.
2017-08-01Variables: macros for null variables.Ruslan Ermilov1-1/+1
No functional changes.
2016-07-12Stream: geoip module.Vladimir Homutov1-245/+134
2014-07-25GeoIP: not all variable fields were initialized.Yichun Zhang1-0/+6
The ngx_http_geoip_city_float_variable and ngx_http_geoip_city_int_variable functions did not always initialize all variable fields like "not_found", which could lead to empty values for those corresponding nginx variables randomly.
2014-07-08Style: remove whitespace between function name and parentheses.Piotr Sikora1-3/+3
Signed-off-by: Piotr Sikora <piotr@cloudflare.com>
2013-02-27Correctly handle multiple X-Forwarded-For headers (ticket #106).Ruslan Ermilov1-12/+10
2013-02-04GeoIP: removed pseudo-support of "proxy" and "netspeed" databases.Ruslan Ermilov1-2/+0
2013-01-24GeoIP: IPv6 support.Ruslan Ermilov1-13/+145
When using IPv6 databases, IPv4 addresses are looked up as IPv4-mapped IPv6 addresses. Mostly based on a patch by Gregor Kališnik (ticket #250).
2012-08-30Fixed strict aliasing bugs when dealing with IPv4-mapped IPv6 addressesRuslan Ermilov1-1/+10
(closes #201).
2012-05-29geoip: got rid of ugly casts when calling ngx_free().Ruslan Ermilov1-4/+4
This is done by removing the "const" qualifier from the common return type of handler functions returning either "const char *" or "char *".
2012-05-28Fixed broken build.Ruslan Ermilov1-2/+2
2012-05-28Fixed memory leak if $geoip_org variable was used.Ruslan Ermilov1-2/+13
Patch by Denis F. Latypoff (slightly modified).
2012-05-14geoip: trusted proxies support and partial IPv6 support.Ruslan Ermilov1-30/+130
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-01-18Copyright updated.Maxim Konovalov1-0/+1
2011-05-16support IPv4 mapped to IPv6 in geoip moduleIgor Sysoev1-28/+42
2011-05-11geoip_orgIgor Sysoev1-0/+118
patch by Alexander Uskov
2011-05-11fix typoIgor Sysoev1-2/+2
2011-01-27utf8 parameter of geoip_country and geoip_cityIgor Sysoev1-2/+24
patch by Denis F. Latypoff
2010-08-03we can free GeoIPRecord just after GeoIP_region_name_by_code(),Igor Sysoev1-10/+4
because it returns a statically allocated string
2010-08-03fix segfault, the bug has been introduced in r3738Igor Sysoev1-0/+7
2010-08-03$geoip_region_nameIgor Sysoev1-0/+48
2010-08-03$geoip_dma_code and $geoip_area_codeIgor Sysoev1-0/+39
2009-12-22$geoip_city_continent_code, $geoip_latitude, $geoip_longitudeIgor Sysoev1-27/+79
2009-08-19fix memory leak if GeoIP City database was usedIgor Sysoev1-3/+19
2009-07-20ngx_http_geoip_moduleIgor Sysoev1-0/+360