From 1b43764a2778648eec5460e98519f0f391d6243e Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Fri, 14 Apr 2023 19:09:46 +0200 Subject: [PATCH] rules.pl: Drop old code to load a blocklist Signed-off-by: Stefan Schantl --- config/firewall/rules.pl | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index ff1378a74..d8c270229 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -1071,26 +1071,6 @@ sub ipset_restore ($) { # If the set is not loaded, we have to rename it to proper use it. run("$IPSET rename $loc_set $set"); } - - # Check if the given set name is a blocklist. - } elsif ($set ~~ @blocklists) { - # IPblocklist sets contains v4 as setname extension. - my $set_name = "$set" . "v4"; - - # Get the database file for the given blocklist. - my $db_file = &IPblocklist::get_ipset_db_file($set); - - # Call function to restore/load the set. - &ipset_call_restore($db_file); - - # Check if the set is already loaded (has been used before). - if ($set ~~ @ipset_used_sets) { - # Swap the sets. - run("$IPSET swap $set_name $set"); - } else { - # Rename the set to proper use it. - run("$IPSET rename $set_name $set"); - } } } -- 2.39.5