From: Victor Julien Date: Mon, 21 Sep 2020 07:12:55 +0000 (+0200) Subject: stream: make sure to call app-layer in case of depth reached X-Git-Tag: suricata-6.0.0~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5a46795bd66e30cbd8e93a4cbf96514a6b9e702;p=thirdparty%2Fsuricata.git stream: make sure to call app-layer in case of depth reached --- diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index b4aacf14fa..f39e1fcc56 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -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);