]> git.proxmox.com Git - pve-firewall.git/commitdiff
fix #3677 ipset_get_chains fixed to work with new ipset output
authorMark Yardley <mgit@fragmentedpackets.net>
Mon, 18 Oct 2021 20:21:32 +0000 (21:21 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 28 Oct 2021 09:01:32 +0000 (11:01 +0200)
Signed-off-by: Mark Yardley <mgit@fragmentedpackets.net>
src/PVE/Firewall.pm

index edc5336c726ce7805025dfcda86d9a0050304aa8..6b9b787ec5b9da50da9d2d29aac15c6f6052974f 100644 (file)
@@ -1948,6 +1948,10 @@ sub ipset_get_chains {
        if ($line =~ m/^(?:\S+)\s(PVEFW-\S+)\s(?:\S+).*/) {
            my $chain = $1;
            $line =~ s/\s+$//; # delete trailing white space
+           # ignore bucketsize onwards from output of ipset v7+
+           if ($line =~ m/^(.*?)(?:\sbucketsize.*)/) {
+               $line = $1;
+           }
            push @{$chains->{$chain}}, $line;
        } else {
            # simply ignore the rest