]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: don't call app reassembly if disable flag set
authorVictor Julien <victor@inliniac.net>
Fri, 3 Mar 2017 08:54:16 +0000 (09:54 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 20 Apr 2017 15:41:11 +0000 (17:41 +0200)
src/stream-tcp-reassemble.c

index 145068d8533108c88b15c6220b9d849dd63de0de..1ece2ae6902a36c1f226a133dd7892a889e41af5 100644 (file)
@@ -1034,9 +1034,9 @@ int StreamTcpReassembleAppLayer (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
 
     /* this function can be directly called by app layer protocol
      * detection. */
-    if (stream->flags & STREAMTCP_STREAM_FLAG_NOREASSEMBLY) {
-        SCLogDebug("stream no reassembly flag set.  Mostly called via "
-                   "app proto detection.");
+    if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED) ||
+        (stream->flags & STREAMTCP_STREAM_FLAG_NOREASSEMBLY)) {
+        SCLogDebug("stream no reassembly flag set or app-layer disabled.");
         SCReturnInt(0);
     }
 
@@ -1055,7 +1055,7 @@ int StreamTcpReassembleAppLayer (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx,
      * 3. check if next_seq is smaller than last_ack, indicating next_seq
      *    has fallen behind the data that is already acked.
      */
-    if (!(ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED)) {
+    {
         int ackadd = (ssn->state >= TCP_FIN_WAIT2) ? 2 : 1;
         if ((stream->seg_list == NULL && /*1*/
                     stream->base_seq == stream->isn+1 &&