]> git.proxmox.com Git - pve-firewall.git/commit
fix CT rule generation with ipfilter set
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 28 May 2019 06:06:39 +0000 (08:06 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 28 May 2019 06:06:42 +0000 (08:06 +0200)
commit9328ea21573bdced86afdaa2f7c3fc7a29129f08
treee6eded42510b00847ff16505d37a4bbfcc73aa15
parent8b092c26060e08792a17ff6a9ffb7ec5591fe0b6
fix CT rule generation with ipfilter set

commit 255698f65192e736708f123d380bbed2aa8c3eac tried to prevent an
error from happening but wasn't to well thought out, perl's operator
precedence was overlooked.
The commit resulted effectively in:
if (my $ip = ($net->{ip} && $vmfw_conf->{options}->{ipfilter})) ...

But intended was:
if (defined(my $ip = $net->{ip}) && $vmfw_conf->{options}->{ipfilter}) ...

First one makes $ip always boolean true (1 in perl) if the if branch
is hit, and the seconds really has then the $ip value in it..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Firewall.pm