]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: make sure to call app-layer in case of depth reached
authorVictor Julien <victor@inliniac.net>
Mon, 21 Sep 2020 07:12:55 +0000 (09:12 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 25 Sep 2020 05:25:00 +0000 (07:25 +0200)
src/stream-tcp-reassemble.c

index b4aacf14fa582cd6f42defe69b7d5a6d76353aba..f39e1fcc561a765e7e1f27f9e3913e9f55c70a61 100644 (file)
@@ -1129,6 +1129,9 @@ static int ReassembleUpdateAppLayer (ThreadVars *tv,
                 break;
             continue;
 
+        } else if (flags & STREAM_DEPTH) {
+            // we're just called once with this flag, so make sure we pass it on
+
         } else if (mydata == NULL || (mydata_len == 0 && ((flags & STREAM_EOF) == 0))) {
             /* Possibly a gap, but no new data. */
             if ((p->flags & PKT_PSEUDO_STREAM_END) == 0 || ssn->state < TCP_CLOSED)
@@ -1169,6 +1172,8 @@ static int ReassembleUpdateAppLayer (ThreadVars *tv,
         if (new_app_progress == app_progress || FlowChangeProto(p->flow))
             break;
         app_progress = new_app_progress;
+        if (flags & STREAM_DEPTH)
+            break;
     }
 
     SCReturnInt(0);