From: Stefan Schantl Date: Fri, 6 Dec 2019 13:33:54 +0000 (+0100) Subject: netexternal.cgi: Use new location lookup method. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb7ba3b4046c9f9bcb741c5476f78952f994eb7d;p=people%2Fstevee%2Fipfire-2.x.git netexternal.cgi: Use new location lookup method. Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/netexternal.cgi b/html/cgi-bin/netexternal.cgi index 8f29eb8a23..bcab8d3344 100644 --- a/html/cgi-bin/netexternal.cgi +++ b/html/cgi-bin/netexternal.cgi @@ -34,6 +34,9 @@ require "${General::swroot}/header.pl"; require "${General::swroot}/geoip-functions.pl"; require "${General::swroot}/graphs.pl"; +# Libloc database handle. +my $libloc_db_handle = &GeoIP::init(); + my %color = (); my %mainsettings = (); my %netsettings=(); @@ -150,7 +153,7 @@ END my $table_colour = ($id++ % 2) ? $color{'color22'} : $color{'color20'}; # collect more information about name server (rDNS, GeoIP country code) - my $ccode = &GeoIP::lookup($nameserver); + my $ccode = &GeoIP::lookup_country_code($libloc_db_handle, $nameserver); my $flag_icon = &GeoIP::get_flag_icon($ccode); my $iaddr = inet_aton($nameserver);