From 25d0e0b68c333029fb8263cb9a2a287f9064b5c8 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 27 Feb 2024 16:16:08 -0600 Subject: [PATCH] plugins: initialize plugins earlier Capture plugins need to be registered before LiveDeviceFinalize, otherwise Suricata errors before the plugin gets a chance to load. Bug: #6811 --- src/suricata.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/suricata.c b/src/suricata.c index f727a6ff21..4749085e4f 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -2672,6 +2672,10 @@ int PostConfLoadedSetup(SCInstance *suri) MacSetRegisterFlowStorage(); +#ifdef HAVE_PLUGINS + SCPluginsLoad(suri->capture_plugin_name, suri->capture_plugin_args); +#endif + LiveDeviceFinalize(); // must be after EBPF extension registration RunModeEngineIsIPS( @@ -2743,9 +2747,6 @@ int PostConfLoadedSetup(SCInstance *suri) FeatureTrackingRegister(); /* must occur prior to output mod registration */ RegisterAllModules(); -#ifdef HAVE_PLUGINS - SCPluginsLoad(suri->capture_plugin_name, suri->capture_plugin_args); -#endif AppLayerHtpNeedFileInspection(); StorageFinalize(); -- 2.47.3