From: Dietmar Maurer Date: Fri, 28 Nov 2014 11:43:31 +0000 (+0100) Subject: fix ipset remove order X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=commitdiff_plain;h=ce41ae23ace374b74ef3908cc4de25a031626eb7 fix ipset remove order --- diff --git a/debian/changelog b/debian/changelog index 1ea7a4c..df0a283 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ pve-firewall (1.0-12) unstable; urgency=low * add preinst script to clear ipset from older installation (because sets cannot be swapped if there type does not match. + + * fix ipset remove order -- Proxmox Support Team Fri, 28 Nov 2014 08:59:38 +0100 diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index f4b199b..20759b6 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -3381,7 +3381,7 @@ sub get_ipset_cmdlist { # remove unused list chains first foreach my $chain (keys %$statushash) { next if $statushash->{$chain}->{action} ne 'delete'; - next if $chain !~ m/-v[46]$/; + next if $chain =~ m/-v[46]$/; $delete_cmdlist .= "flush $chain\n"; $delete_cmdlist .= "destroy $chain\n"; @@ -3390,7 +3390,7 @@ sub get_ipset_cmdlist { # the remove unused -v4 -v6 chains foreach my $chain (keys %$statushash) { next if $statushash->{$chain}->{action} ne 'delete'; - next if $chain =~ m/-v[46]$/; + next if $chain !~ m/-v[46]$/; $delete_cmdlist .= "flush $chain\n"; $delete_cmdlist .= "destroy $chain\n";