X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=blobdiff_plain;f=src%2FPVE%2FFirewall.pm;h=8f545e7b439768f11d524e4d1031b9675066fc58;hp=b8ade7c3c35a46bd22fb12f7288027fa5e3f25ad;hb=fc1f1de97e005b3d84dca3c4723708b24ba2219f;hpb=f706def5ceeeb670cc1eb2e1ac3e806b167afdb9 diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index b8ade7c..8f545e7 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -1836,7 +1836,10 @@ sub ebtables_get_chains { my $line = shift; return if $line =~ m/^#/; return if $line =~ m/^\s*$/; - if ($line =~ m/^(?:\S+)\s(PVEFW-\S+)\s(?:\S+).*/) { + if ($line =~ m/^:(\S+)\s\S+$/) { + # Make sure we know chains exist even if they're empty. + $chains->{$1} //= []; + } elsif ($line =~ m/^(?:\S+)\s(PVEFW-\S+)\s(?:\S+).*/) { my $chain = $1; $line =~ s/\s+$//; push @{$chains->{$chain}}, $line;