stream: fix stream pruning being too aggressive

Pruning of StreamBufferBlocks could remove blocks that fell entirely
after the target offset due to a logic error. This could lead to data
being evicted that was still meant to be processed in theapp-layer
parsers.

Bug: #4953.
pull/6781/head
Victor Julien 3 years ago
parent 544ff0fb52
commit 78f5e082f5

@ -412,7 +412,7 @@ static void SBBPrune(StreamingBuffer *sb)
StreamingBufferBlock *sbb = NULL, *safe = NULL;
RB_FOREACH_SAFE(sbb, SBB, &sb->sbb_tree, safe) {
/* completely beyond window, we're done */
if (sbb->offset > sb->stream_offset) {
if (sbb->offset >= sb->stream_offset) {
sb->head = sbb;
break;
}

Loading…
Cancel
Save