[pve-devel] [PATCH] firewall ipversion comparison fix

Alen Grizonic a.grizonic at proxmox.com
Tue Aug 4 10:55:24 CEST 2015


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 1286238..83915df 100644
--- a/src/PVE/Firewall.pm
+++ b/src/PVE/Firewall.pm
@@ -1197,7 +1197,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