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
pull/8430/head
Lukas Sismis 4 years ago committed by Victor Julien
parent 958f94276a
commit 03c21bfaa8

@ -2640,6 +2640,11 @@ int PostConfLoadedSetup(SCInstance *suri)
MacSetRegisterFlowStorage(); MacSetRegisterFlowStorage();
LiveDeviceFinalize(); // must be after EBPF extension registration
RunModeEngineIsIPS(
suricata.run_mode, suricata.runmode_custom_mode, suricata.capture_plugin_name);
AppLayerSetup(); AppLayerSetup();
/* Suricata will use this umask if provided. By default it will use the /* Suricata will use this umask if provided. By default it will use the
@ -2745,11 +2750,6 @@ int PostConfLoadedSetup(SCInstance *suri)
DecodeGlobalConfig(); DecodeGlobalConfig();
LiveDeviceFinalize();
RunModeEngineIsIPS(
suricata.run_mode, suricata.runmode_custom_mode, suricata.capture_plugin_name);
/* hostmode depends on engine mode being set */ /* hostmode depends on engine mode being set */
PostConfLoadedSetupHostMode(); PostConfLoadedSetupHostMode();

Loading…
Cancel
Save