From 4fca9c997dcf621542e0d0a88bc27235e0ea8b99 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 10 Jul 2014 12:37:56 +0200 Subject: [PATCH] firewalllogcountry.dat: Fix chart for dial-in connections. --- config/rootfiles/core/80/filelists/files | 1 + html/cgi-bin/logs.cgi/firewalllogcountry.dat | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/rootfiles/core/80/filelists/files b/config/rootfiles/core/80/filelists/files index 103cddcf8..e59252bd3 100644 --- a/config/rootfiles/core/80/filelists/files +++ b/config/rootfiles/core/80/filelists/files @@ -3,6 +3,7 @@ etc/issue etc/logrotate.conf etc/rc.d/init.d/dhcrelay etc/rc.d/init.d/dnsmasq +srv/web/ipfire/cgi-bin/logs.cgi/firewalllogcountry.dat srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/routing.cgi usr/sbin/dhcrelay diff --git a/html/cgi-bin/logs.cgi/firewalllogcountry.dat b/html/cgi-bin/logs.cgi/firewalllogcountry.dat index af1427908..3a774f922 100644 --- a/html/cgi-bin/logs.cgi/firewalllogcountry.dat +++ b/html/cgi-bin/logs.cgi/firewalllogcountry.dat @@ -283,12 +283,14 @@ END &Header::openbox('100%', 'left', 'Firewall Logs'); print "

$Lang::tr{'firewall hits'} $longmonthstr $daystr: $lines

"; +my $red_interface = &General::get_red_interface(); my $linesjc = 0; my %tabjc; my $gi = Geo::IP::PurePerl->new(); if ($pienumber == -1 || $pienumber > $lines || $sortcolumn == 2) { $pienumber = $lines; }; $lines = 0; + foreach $_ (@log) { /^... (..) (..:..:..) [\w\-]+ kernel:(.*)(IN=.*)$/; @@ -296,7 +298,7 @@ foreach $_ (@log) $packet =~ /IN=(\w+)/; my $iface=$1; if ( $1 =~ /2./ ){ $iface="";} $packet =~ /SRC=([\d\.]+)/; my $srcaddr=$1; - if($iface eq 'red0') { + if($iface eq $red_interface) { if($srcaddr ne '') { my $ccode = $gi->country_code_by_name($srcaddr); if( $ccode eq '') { -- 2.39.2