]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/logs.cgi/firewalllogcountry.dat
Fixed detection of firewall chain when bridge is used for ipv6
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / logs.cgi / firewalllogcountry.dat
index 2661ddd01af6a9d29a05c6e5a2f638bcd84788ce..087b844432e3c39c4deacc5a04e6e15b70b446d2 100644 (file)
@@ -294,16 +294,16 @@ $lines = 0;
 foreach $_ (@log)
 {
   # If ipv6 uses bridge, use PHYSIN for iface, otherwise IN
-  if (/^... (..) (..:..:..) [\w\-]+ kernel:(.*)(PHYSIN=.*)$/) {}
+  if    (/^... (..) (..:..:..) [\w\-]+ kernel:(.*)(PHYSIN=.*)$/) {}
   elsif (/^... (..) (..:..:..) [\w\-]+ kernel:(.*)(IN=.*)$/) {}
   my $packet = $4;
   my $iface  = '';
-  if ($packet =~ /PHYSIN=(\w+)/) { $iface = $1 } elsif ($packet =~ /IN=(\w+)/) { $iface = $1 }
+  if ($packet =~ /PHYSIN=(\w+)/) { $iface = $1; } elsif ($packet =~ /IN=(\w+)/) { $iface = $1; }
   if ( $1 =~ /2./ ) { $iface=''; }
   my $srcaddr = '';
   # Find ipv4 and ipv6 addresses
-  if ($packet =~ /SRC\=(([\d]{1,3})(\.([\d]{1,3})){3})/) { $srcaddr = $1 }
-  elsif ($packet =~ /SRC\=(([0-9a-fA-F]{0,4})(\:([0-9a-fA-F]{0,4})){2,7})/) { $srcaddr = $1 }
+  if    ($packet =~ /SRC\=(([\d]{1,3})(\.([\d]{1,3})){3})/) { $srcaddr = $1; }
+  elsif ($packet =~ /SRC\=(([0-9a-fA-F]{0,4})(\:([0-9a-fA-F]{0,4})){2,7})/) { $srcaddr = $1; }
 
   if($iface eq $red_interface) {
     # Traffic from red