]> git.proxmox.com Git - pve-firewall.git/commitdiff
firewall ipversion comparison fix
authorAlen Grizonic <a.grizonic@proxmox.com>
Tue, 16 Feb 2016 12:09:01 +0000 (13:09 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 16 Feb 2016 12:11:30 +0000 (13:11 +0100)
Signed-off-by: Alen Grizonic <a.grizonic@proxmox.com>
src/PVE/Firewall.pm

index 3057d218a8c73747b7b56ecd9b161defbf18f352..83421cc2053747b297ef1329bd66856199562cd8 100644 (file)
@@ -1190,7 +1190,9 @@ my $apply_macro = sub {
     }
 
     # skip macros which are specific to another ipversion
     }
 
     # 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 = [];
 
 
     my $rules = [];