]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commit
rules.pl: Avoid creating iptables rules if the corresponding blocklist is not loaded
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 14 Apr 2023 16:32:54 +0000 (18:32 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Fri, 14 Apr 2023 16:32:54 +0000 (18:32 +0200)
commit65f4a6ac58ca1fae1fb89c6472df0fdd8a079acb
treebf87690c27baa2a5eab4adc68b3b1204ea7cacbe
parenta13414ac78096f6ecd8383439a9ee3b4b17804dd
rules.pl: Avoid creating iptables rules if the corresponding blocklist is not loaded

In case a blocklist is empty after de-duplication of the entries, it
would not be loaded. In such a case we also can skip creating any
iptables rules for this list.

This avoids us checking against an empty list and therefore saves a few cpu cycles.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/firewall/rules.pl