[pve-devel] [PATCH v2 firewall 2/2] ebtables: treat chain deletion as change

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jul 10 11:59:20 CEST 2019


since it is one. otherwise, 'pve-firewall compile' will print false
information as long as the deletion has not been applied yet.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
new in v2

 src/PVE/Firewall.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 3b67186..41f48d6 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -4033,8 +4033,8 @@ sub get_ebtables_cmdlist {
 
     foreach my $chain (sort keys %$statushash) {
 	my $stat = $statushash->{$chain};
-	next if ($stat->{action} eq 'delete');
 	$changes = 1 if ($stat->{action} !~ 'ignore|exists');
+	next if ($stat->{action} eq 'delete');
 
 	foreach my $cmd (@{$statushash->{$chain}->{'rules'}}) {
 	    if ($chain eq 'FORWARD' && $cmd eq $append_pve_to_forward) {
-- 
2.20.1





More information about the pve-devel mailing list