firewall: fix rules not loading w/o commandline opts

Firewall rules were supposed to also load when using a config like

        ##
        ## Suricata as a Firewall options (experimental)
        ##
        firewall:
          # toggle to enable firewall mode
          enabled: yes

          # Firewall rule file are in their own path and are not managed
          # by Suricata-Update.
          rule-path: /etc/suricata/firewall/

          # List of files with firewall rules. Order matters, files are loaded
          # in order and rules are applied in that order (per state, see docs)
          rule-files:
            - firewall.rules

But they were not because of a missing check.

Bug: #8206.
(cherry picked from commit 2a2b98650b)
pull/14647/head
Victor Julien 6 months ago
parent c6d9b573a0
commit 9c0162c468

@ -391,7 +391,7 @@ int SigLoadSignatures(DetectEngineCtx *de_ctx, char *sig_file, bool sig_file_exc
SetupEngineAnalysis(de_ctx, &fp_engine_analysis_set, &rule_engine_analysis_set);
}
if (de_ctx->firewall_rule_file_exclusive) {
if (EngineModeIsFirewall() || de_ctx->firewall_rule_file_exclusive) {
if (LoadFirewallRuleFiles(de_ctx) < 0) {
if (de_ctx->failure_fatal) {
exit(EXIT_FAILURE);

Loading…
Cancel
Save