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.
pull/2284/head
Eric Leblond 10 years ago committed by Victor Julien
parent dc8e0b3cf2
commit 398489e6df

@ -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

Loading…
Cancel
Save