]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: fix --disable-detection reassembly issue 1479/head
authorVictor Julien <victor@inliniac.net>
Tue, 5 May 2015 17:43:33 +0000 (19:43 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 11 May 2015 11:35:54 +0000 (13:35 +0200)
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

index 60bf9ed0257005bc446b7d1e0f0829fd6e636022..d87f4d52ca4df11c1d8e652edb2fc6e725cbe6e7 100644 (file)
@@ -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);
     }