]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ids-functions.pl: Make downloader work with new ruleset-sources file
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 19 Mar 2021 20:26:44 +0000 (21:26 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 19 Dec 2021 12:21:51 +0000 (13:21 +0100)
format.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index 0e397ca192182a1dd9b61604c04ed09b2cbf1184..e9298ac4b6f989fdc252836e5a773223b0ed6b0c 100644 (file)
@@ -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/\<oinkcode\>/$rulessettings{'OINKCODE'}/g;