]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commit
rules.pl: Allow dynamic destory of loaded but unused ipset sets.
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 24 Feb 2022 17:02:54 +0000 (18:02 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 24 Feb 2022 17:47:50 +0000 (18:47 +0100)
commit1f7e0abf32cec7dfdb94878e6ccb21d80527d4d2
tree1a5387cb65af86e5e3169dc5e6d138f718385360
parentc81ccd00de9da90d13b0db420a184e52bbc24de2
rules.pl: Allow dynamic destory of loaded but unused ipset sets.

Instead of stupidly destroying all ipsets, we now grab the already loaded sets
and compare them with the loaded sets during runtime of the script.

So we are now able to determine which sets are not longer required and
safely can destroy (unload) at a later time.

This saves us from taking care about dropping/flushing rules which are
based on ipset before we can destroy them - because only unused sets are
affected.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Inspired-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
config/firewall/rules.pl