]> 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>
Sun, 3 Mar 2024 11:56:03 +0000 (12:56 +0100)
commitfe4b7fee694c25184ff09ffbc829d0c67b603cc2
treea4bb957ab3f3207862366d4e2d88081c0e766fd8
parent6657a3ec8db95da060165cb97c1e6ac7b8f5b2ff
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