]> git.ipfire.org Git - ipfire-2.x.git/commit - config/firewall/rules.pl
rules.pl: Allow dynamic destory of loaded but unused ipset sets.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 27 Feb 2022 13:49:02 +0000 (14:49 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Sat, 5 Mar 2022 14:31:51 +0000 (14:31 +0000)
commit2801213dcc97329d5ab24ec0483fdbc5020e0247
tree3b245cdfb4c53fb36af0298bfc061b4623d6f178
parent65808f8478b41ed4881388bc70d71c2f4ee8b8c4
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>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
config/firewall/rules.pl