From c0bdac7c5c0835aff241a1136d552ccf7106d147 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 6 May 2015 13:08:32 +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 9ad4b8be9d..778ecebdfe 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -2201,6 +2201,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"); + } + PacketPoolInit(max_pending_packets); HostInitConfig(HOST_VERBOSE); if (suri.run_mode != RUNMODE_UNIX_SOCKET) { @@ -2228,9 +2233,6 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } } else { - /* disable raw reassembly */ - (void)ConfSetFinal("stream.reassembly.raw", "false"); - /* tell the app layer to consider only the log id */ RegisterAppLayerGetActiveTxIdFunc(AppLayerTransactionGetActiveLogOnly); } -- 2.47.3