X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fconnections.cgi;h=e9e9e335cfe4356b8509b5a79b1f482562e51e6c;hp=85a9cd74501452edc39ac6111218f1c88a9e410e;hb=5709768b0bab2b860911fcad66da8e0aec5c4eaa;hpb=159c9eb9b1ac6144db50e4677132c51ddf2d8ceb diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index 85a9cd7450..e9e9e335cf 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -31,6 +31,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"; my $colour_multicast = "#A0A0A0"; @@ -262,7 +263,7 @@ close(IPSEC); foreach my $line (@ipsec) { my @vpn = split(',', $line); - my @subnets = split('|', $vpn[12]); + my @subnets = split(/\|/, $vpn[12]); for my $subnet (@subnets) { my ($network, $mask) = split("/", $subnet); @@ -379,6 +380,7 @@ print < +   @@ -386,6 +388,7 @@ print < +   @@ -409,9 +412,15 @@ print < $Lang::tr{'source ip and port'} + + $Lang::tr{'country'} + $Lang::tr{'dest ip and port'} + + $Lang::tr{'country'} + $Lang::tr{'download'} /
$Lang::tr{'upload'} @@ -540,6 +549,12 @@ 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); + # Format TTL $ttl = format_time($ttl); @@ -601,6 +616,9 @@ foreach my $line (@conntrack) { $sport_extra + + $srcccode + $dip @@ -613,6 +631,9 @@ foreach my $line (@conntrack) { $dport_extra + + $dstccode + $bytes_in / $bytes_out