mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 08:22:59 +02:00
update-ids-ruleset: Skip unsupported providers.
In case a configured provider is not longer supported, simply skip it and do not try to perform an update. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -26,6 +26,9 @@ require '/var/ipfire/general-functions.pl';
|
||||
require "${General::swroot}/ids-functions.pl";
|
||||
require "${General::swroot}/lang.pl";
|
||||
|
||||
# Import ruleset providers file.
|
||||
require "$IDS::rulesetsourcesfile";
|
||||
|
||||
# Load perl module to talk to the kernel syslog.
|
||||
use Sys::Syslog qw(:DEFAULT setlogsock);
|
||||
|
||||
@@ -102,6 +105,9 @@ foreach my $id (keys %providers) {
|
||||
my $enabled_status = $providers{$id}[2];
|
||||
my $autoupdate_status = $providers{$id}[3];
|
||||
|
||||
# Skip unsupported providers.
|
||||
next unless($IDS::Ruleset::Providers{$provider});
|
||||
|
||||
# Skip the provider if it is not enabled.
|
||||
next unless($enabled_status eq "enabled");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user