]> git.proxmox.com Git - pve-firewall.git/commit - src/PVE/API2/Firewall/IPSet.pm
api/ipsets: parse_cidr before checking for duplicates
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 29 Apr 2020 08:52:54 +0000 (10:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 2 May 2020 17:05:49 +0000 (19:05 +0200)
commit891545e828b4ee3352ec4b2149e7f765b2ed47f3
tree8aef34deeaf5c140c1bbc38361278bfdd9a98be0
parent9388a8f47a6db83a8a1f8f2b5852b6792fffa0f4
api/ipsets: parse_cidr before checking for duplicates

for example, the config parser drops a trailing /32 for IPv4, so we
should do the same here.  otherwise we can have one entry for $IP and
one for $IP/32 with different properties until the next R-M-W cycle
drops one of them again.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PVE/API2/Firewall/IPSet.pm