From: Victor Julien Date: Tue, 5 May 2015 17:43:33 +0000 (+0200) Subject: stream: fix --disable-detection reassembly issue X-Git-Tag: suricata-3.0RC1~427 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1479%2Fhead;p=thirdparty%2Fsuricata.git 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. --- 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); }