firewalllogcountry.dat: Fix chart for dial-in connections.

This commit is contained in:
Michael Tremer
2014-07-10 12:37:56 +02:00
parent 4cb523d462
commit 4fca9c997d
2 changed files with 4 additions and 1 deletions

View File

@@ -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

View File

@@ -283,12 +283,14 @@ END
&Header::openbox('100%', 'left', 'Firewall Logs');
print "<p><b>$Lang::tr{'firewall hits'} $longmonthstr $daystr: $lines</b></p>";
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 '') {