mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-22 17:02:58 +02:00
ids.cgi: Fix logic if suricata needs to be restarted.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
committed by
Arne Fitzenreiter
parent
b563d5bd69
commit
1622e5c1f3
@@ -417,17 +417,17 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'save'}) {
|
||||
|
||||
# Loop through the hash of idsrules.
|
||||
foreach my $rulefile(keys %idsrules) {
|
||||
# Check if the state of the rulefile has been changed.
|
||||
unless ($cgiparams{$rulefile} eq $idsrules{$rulefile}{'Rulefile'}{'State'}) {
|
||||
# A restart of suricata is required to apply the changes of the used rulefiles.
|
||||
$suricata_restart_required = 1;
|
||||
}
|
||||
|
||||
# Check if the rulefile is enabled.
|
||||
if ($cgiparams{$rulefile} eq "on") {
|
||||
# Add rulefile to the array of enabled rulefiles.
|
||||
push(@enabled_rulefiles, $rulefile);
|
||||
|
||||
# Check if the state of the rulefile has been changed.
|
||||
unless ($cgiparams{$rulefile} eq $idsrules{$rulefile}{'Rulefile'}{'State'}) {
|
||||
# A restart of suricata is required to apply the changes of the used rulefiles.
|
||||
$suricata_restart_required = 1;
|
||||
}
|
||||
|
||||
# Drop item from cgiparams hash.
|
||||
delete $cgiparams{$rulefile};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user