From 398489e6df179e621563ac966e47a6a376c4e3de Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 2 Feb 2016 23:44:24 +0100 Subject: [PATCH] stream: fix depth reached detection When a segment only partially fit in streaming depth, the stream depth reached flag was not set resulting in a continuous inspection of the rest of the session. By setting the stream depth reached flag when the segment partially fit we avoid to reenter the code and we don't take anymore a code path resulting in the flag not to be set. --- src/stream-tcp-reassemble.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 30b725a18d..28bf4b537c 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -1805,6 +1805,7 @@ static uint32_t StreamTcpReassembleCheckDepth(TcpStream *stream, /* complete fit */ SCReturnUInt(size); } else { + stream->flags |= STREAMTCP_STREAM_FLAG_DEPTH_REACHED; /* partial fit, return only what fits */ uint32_t part = (stream->isn + stream_config.reassembly_depth) - seq; #if DEBUG -- 2.47.2