From: Sven Strickroth Date: Wed, 26 Aug 2015 18:03:01 +0000 (+0200) Subject: Use ::ffff: prefix for IPv4 addresses X-Git-Tag: AWSTATS_7_5~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7%2Fhead;p=thirdparty%2FAWStats.git Use ::ffff: prefix for IPv4 addresses As of RFC4291 the :: is deprecated. Signed-off-by: Sven Strickroth --- diff --git a/wwwroot/cgi-bin/plugins/geoip6.pm b/wwwroot/cgi-bin/plugins/geoip6.pm index 399e5879..6be13333 100644 --- a/wwwroot/cgi-bin/plugins/geoip6.pm +++ b/wwwroot/cgi-bin/plugins/geoip6.pm @@ -104,7 +104,7 @@ sub GetCountryCodeByAddr_geoip6 { if (! $param) { return ''; } my $searchkey; if ($param =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { # IPv4 address - $searchkey = '::'.$param; + $searchkey = '::ffff:'.$param; } else { $searchkey = $param; } @@ -177,7 +177,7 @@ sub ShowInfoHost_geoip6 { my $key; if ($param =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) { # IPv4 address $ip=4; - $key='::'.$param; + $key='::ffff:'.$param; } elsif ($param =~ /^[0-9A-F]*:/i) { # IPv6 address $ip=6;