From: Victor Julien Date: Fri, 3 Mar 2017 08:54:56 +0000 (+0100) Subject: stream: enforce gap earlier in app reassembly X-Git-Tag: suricata-4.0.0-beta1~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=606f515fe923c6dfd2ff8365898f782f5b2a111f;p=thirdparty%2Fsuricata.git stream: enforce gap earlier in app reassembly --- diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 1ece2ae690..5d4a067bc4 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -1039,6 +1039,10 @@ int StreamTcpReassembleAppLayer (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, SCLogDebug("stream no reassembly flag set or app-layer disabled."); SCReturnInt(0); } + if (stream->flags & STREAMTCP_STREAM_FLAG_GAP) { + SCReturnInt(0); + } + SCLogDebug("stream->seg_list %p", stream->seg_list); #ifdef DEBUG @@ -1123,10 +1127,6 @@ int StreamTcpReassembleAppLayer (ThreadVars *tv, TcpReassemblyThreadCtx *ra_ctx, SCReturnInt(0); } - if (stream->flags & STREAMTCP_STREAM_FLAG_GAP) { - SCReturnInt(0); - } - /* with all that out of the way, lets update the app-layer */ return ReassembleUpdateAppLayer(tv, ra_ctx, ssn, stream, p, dir); }