]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/connections.cgi
aliases.cgi: Use new system methods
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / connections.cgi
index e9e9e335cfe4356b8509b5a79b1f482562e51e6c..8613b9d9b0c3126e81606baf4a5e18179432ae0b 100644 (file)
@@ -20,6 +20,7 @@
 ###############################################################################
 
 use strict;
+use experimental 'smartmatch';
 
 use Net::IPv4Addr qw( :all );
 use Switch;
@@ -31,7 +32,7 @@ use Switch;
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
 require "${General::swroot}/header.pl";
-require "${General::swroot}/geoip-functions.pl";
+require "${General::swroot}/location-functions.pl";
 
 my $colour_multicast = "#A0A0A0";
 
@@ -549,11 +550,11 @@ foreach my $line (@conntrack) {
        my $bytes_in = format_bytes($bytes[0]);
        my $bytes_out = format_bytes($bytes[1]);
 
-       # enumerate GeoIP information
-       my $srcccode = &GeoIP::lookup($sip_ret);
-       my $src_flag_icon = &GeoIP::get_flag_icon($srcccode);
-       my $dstccode = &GeoIP::lookup($dip_ret);
-       my $dst_flag_icon = &GeoIP::get_flag_icon($dstccode);
+       # enumerate location information
+       my $srcccode = &Location::Functions::lookup_country_code($sip_ret);
+       my $src_flag_icon = &Location::Functions::get_flag_icon($srcccode);
+       my $dstccode = &Location::Functions::lookup_country_code($dip_ret);
+       my $dst_flag_icon = &Location::Functions::get_flag_icon($dstccode);
 
        # Format TTL
        $ttl = format_time($ttl);