From 60ab67f52df04c415004ff3e4d45335ca0a62307 Mon Sep 17 00:00:00 2001 From: Mira Limbeck Date: Wed, 24 Aug 2022 14:24:30 +0200 Subject: [PATCH] fix invalid vmfw config being interpreted as enabled MAC filter was enabled as long as the VM firewall config existed even with an invalid config. With this change the check now matches the one for CTs. Signed-off-by: Mira Limbeck --- 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 e2331d8..3c6f0df 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -3964,7 +3964,7 @@ sub compile_ebtables_filter { eval { my $conf = $vmdata->{qemu}->{$vmid}; my $vmfw_conf = $vmfw_configs->{$vmid}; - return if !$vmfw_conf; + return if !$vmfw_conf || !$vmfw_conf->{options}->{enable}; my $ipsets = $vmfw_conf->{ipset}; foreach my $netid (sort keys %$conf) { -- 2.39.2