]> git.proxmox.com Git - pve-firewall.git/blobdiff - src/PVE/Firewall.pm
fix #3677 ipset_get_chains fixed to work with new ipset output
[pve-firewall.git] / 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