[pve-devel] [stable-3 firewall] firewall ipversion comparison fix

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Feb 16 13:09:01 CET 2016


From: Alen Grizonic <a.grizonic at proxmox.com>

Signed-off-by: Alen Grizonic <a.grizonic at proxmox.com>
---
 src/PVE/Firewall.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm
index 3057d21..83421cc 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -1190,7 +1190,9 @@ my $apply_macro = sub {
     }
 
     # skip macros which are specific to another ipversion
-    return if ($ipversion//0) != ($pve_fw_macro_ipversion->{$macro_name}//0);
+    if ($ipversion && (my $required = $pve_fw_macro_ipversion->{$macro_name})) {
+	return if $ipversion != $required;
+    }
 
     my $rules = [];
 
-- 
2.1.4





More information about the pve-devel mailing list