Nginx 1.3.12 GeoIP IPv6

Since release 1.3.12 the geoip module supports IPv6. This nginx configuration works fine for me:

geoip_country   /usr/share/GeoIP/GeoIPv6.dat; # the country IP database
geoip_city      /usr/share/GeoIP/GeoLiteCityv6.dat; # the city IP database

I use $geoip_country_code in my logformat in order to log the country:

log_format  main  '$host $remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for" '
                  '$ssl_cipher $request_time $gzip_ratio '
                  '$upstream_addr $upstream_response_time $geoip_country_code';

A quick test shows eveything is working as designed:

user@aladin:/home/phil# curl -I -4  http://www.hellmi.de
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sun, 10 Feb 2013 10:48:07 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.hellmi.de/en/

user@aladin:/home/phil# curl -I -6  http://www.hellmi.de
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Sun, 10 Feb 2013 10:48:12 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.hellmi.de/en/

user@aladin:/home/phil# tail -2 /var/log/nginx/access.log
www.hellmi.de 66.228.57.159 - - [10/Feb/2013:10:48:07 +0000] "HEAD / HTTP/1.1" 301 0 "-" "curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3" "-" - 0.000 - - - US
www.hellmi.de 2600:3c02::f03c:91ff:fe96:b43f - - [10/Feb/2013:10:48:12 +0000] "HEAD / HTTP/1.1" 301 0 "-" "curl/7.22.0 (i686-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3" "-" - 0.000 - - - US

The IPv6 database contains IPv4 addresses as well, thus resolving both types work using the same configuration.