]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ipinfo.cgi: Use new location lookup method.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 5 Dec 2019 16:17:42 +0000 (17:17 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 6 Dec 2019 13:21:08 +0000 (14:21 +0100)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/ipinfo.cgi

index b756a24d2a5e97e67434ecdeb2acbe11763f1f9b..6465bc3e4c0f4e1baea967ba885e5183edf7e015 100644 (file)
@@ -52,7 +52,8 @@ if (&General::validip($addr)) {
        if (!$hostname) { $hostname = $Lang::tr{'lookup failed'}; }
 
        # enumerate GeoIP information for IP address...
-       my $ccode = &GeoIP::lookup($addr);
+       my $db_handle = &GeoIP::init();
+       my $ccode = &GeoIP::lookup_country_code($db_handle, $addr);
        my $flag_icon = &GeoIP::get_flag_icon($ccode);
 
        my $sock = new IO::Socket::INET ( PeerAddr => $whoisname, PeerPort => 43, Proto => 'tcp');