From: Lukas Sismis Date: Wed, 28 Dec 2022 04:49:02 +0000 (+0700) Subject: runmodes: Determine engine's copy-mode as early as possible X-Git-Tag: suricata-7.0.0-rc1~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03c21bfaa88f628368db06844157c5118e96387f;p=thirdparty%2Fsuricata.git runmodes: Determine engine's copy-mode as early as possible Configuration and behavior of HTP app layer depends on the copy mode of Suricata engine. Copy mode was set after the app layer setup. Decision of engine's copy mode operation is now made earlier. Ticket: #5706 --- diff --git a/src/suricata.c b/src/suricata.c index 934817365f..a3e43ab752 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -2640,6 +2640,11 @@ int PostConfLoadedSetup(SCInstance *suri) MacSetRegisterFlowStorage(); + LiveDeviceFinalize(); // must be after EBPF extension registration + + RunModeEngineIsIPS( + suricata.run_mode, suricata.runmode_custom_mode, suricata.capture_plugin_name); + AppLayerSetup(); /* Suricata will use this umask if provided. By default it will use the @@ -2745,11 +2750,6 @@ int PostConfLoadedSetup(SCInstance *suri) DecodeGlobalConfig(); - LiveDeviceFinalize(); - - RunModeEngineIsIPS( - suricata.run_mode, suricata.runmode_custom_mode, suricata.capture_plugin_name); - /* hostmode depends on engine mode being set */ PostConfLoadedSetupHostMode();