From 9764a356047a191f0f5f0171371f560d316cf444 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 5 May 2015 19:43:33 +0200 Subject: [PATCH] stream: fix --disable-detection reassembly issue Due to an error at initialization, the stream engine would not disable 'raw' reassembly automatically when --disable-detection was used. This lead to segments not getting cleared from the segment lists. --- src/suricata.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/suricata.c b/src/suricata.c index 60bf9ed025..d87f4d52ca 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -2240,6 +2240,11 @@ int main(int argc, char **argv) NSS_NoDB_Init(NULL); #endif + if (suri.disabled_detect) { + /* disable raw reassembly */ + (void)ConfSetFinal("stream.reassembly.raw", "false"); + } + HostInitConfig(HOST_VERBOSE); if (suri.run_mode != RUNMODE_UNIX_SOCKET) { FlowInitConfig(FLOW_VERBOSE); @@ -2279,9 +2284,6 @@ int main(int argc, char **argv) DetectEngineAddToMaster(de_ctx); } else { - /* disable raw reassembly */ - (void)ConfSetFinal("stream.reassembly.raw", "false"); - /* tell the app layer to consider only the log id */ RegisterAppLayerGetActiveTxIdFunc(AppLayerTransactionGetActiveLogOnly); } -- 2.47.2