mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Fixed detection of firewall chain when bridge is used for ipv6
Signed-off-by: Michael Eitelwein <michael@eitelwein.net>
This commit is contained in:
@@ -339,7 +339,7 @@ foreach $_ (@log)
|
||||
my $chain = $3;
|
||||
|
||||
my ($iface, $srcaddr, $dstaddr, $macaddr, $proto, $srcport, $dstport);
|
||||
if ($packet =~ /PHYSIN=(\w+)/) { $iface=$1 } elsif ($packet =~ /IN=(\w+)/) { $iface = $1; }
|
||||
if ($packet =~ /PHYSIN=(\w+)/) { $iface=$1; } elsif ($packet =~ /IN=(\w+)/) { $iface = $1; }
|
||||
# Identify whether ipv4 or ipv6. Both are mutally exclusive.
|
||||
if ($packet =~ /SRC\=(([\d]{1,3})(\.([\d]{1,3})){3})/) { $srcaddr=$1; }
|
||||
if ($packet =~ /SRC\=(([0-9a-fA-F]{0,4})(\:([0-9a-fA-F]{0,4})){2,7})/) { $srcaddr=$1; }
|
||||
|
||||
Reference in New Issue
Block a user