"ENABLE" => "off",
);
+my %ipset_loaded_sets = ();
my @ipset_used_sets = ();
my $configfwdfw = "${General::swroot}/firewall/config";
my $db_file;
# Check if the set already has been loaded.
- return if(&IPSet::Functions::ipset_exists($set));
+ if($ipset_loaded_sets{$set}) {
+ # It already has been loaded - so there is nothing to do.
+ return;
+ }
# Check if the given set name is a country code.
if($set ~~ @locations) {
run("$IPSET rename $loc_set $set");
}
}
+
+ # Store the restored set to the hash to prevent from loading it again.
+ $ipset_loaded_sets{$set} = "1";
}
sub ipset_call_restore ($) {