[3/3] rules.pl: Prevent from cleanup the IPSWHITELIST set.

Message ID 20220406191245.4218-3-stefan.schantl@ipfire.org
State Superseded
Headers
Series [1/3] ids-functions.pl: Generate ipset based whitelist. |

Commit Message

Stefan Schantl April 6, 2022, 7:12 p.m. UTC
  Init the IPSWHITELIST set as loaded to prevent from destroying
during cleanup.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 config/firewall/rules.pl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
  

Patch

diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl
index 19dc7a6d1..0591a47be 100644
--- a/config/firewall/rules.pl
+++ b/config/firewall/rules.pl
@@ -73,7 +73,10 @@  my %confignatfw=();
 my %locationsettings = (
 	"LOCATIONBLOCK_ENABLED" => "off"
 );
-my %ipset_loaded_sets = ();
+my %ipset_loaded_sets = (
+	"IPSWHITELIST" => "1",
+);
+
 my @ipset_used_sets = ();
 
 my $configfwdfw		= "${General::swroot}/firewall/config";