From: Stefan Schantl Date: Fri, 19 Mar 2021 20:26:44 +0000 (+0100) Subject: ids-functions.pl: Make downloader work with new ruleset-sources file X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=57331a0d8508dfdc029afee807701dea592574f4;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Make downloader work with new ruleset-sources file format. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 0e397ca192..e9298ac4b6 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -169,10 +169,6 @@ sub downloadruleset { return 1; } - # Get all available ruleset locations. - my %rulesetsources=(); - &General::readhash($rulesetsourcesfile, \%rulesetsources); - # Read proxysettings. my %proxysettings=(); &General::readhash("${General::swroot}/proxy/settings", \%proxysettings); @@ -205,7 +201,7 @@ sub downloadruleset { } # Grab the right url based on the configured vendor. - my $url = $rulesetsources{$rulessettings{'RULES'}}; + my $url = $IDS::Ruleset::Providers{$rulessettings{'RULES'}}{'dl_url'}; # Check if the vendor requires an oinkcode and add it if needed. $url =~ s/\/$rulessettings{'OINKCODE'}/g;