From 909a3fdf4281838cda2718a2acde6ee61cd3c6cc Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 27 Jun 2022 11:34:14 +0200 Subject: [PATCH] stream: fix GAP check Gap check would consider a GAP when the current data was in fact exactly not a gap, but next segment(s) were already available. (cherry picked from commit 100d821a9fbe61709be275f77341438626a561e8) --- src/stream-tcp-reassemble.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream-tcp-reassemble.c b/src/stream-tcp-reassemble.c index 01306a802e..670182111c 100644 --- a/src/stream-tcp-reassemble.c +++ b/src/stream-tcp-reassemble.c @@ -930,7 +930,7 @@ static inline bool GapAhead(TcpStream *stream, StreamingBufferBlock *cur_blk) { StreamingBufferBlock *nblk = SBB_RB_NEXT(cur_blk); if (nblk && (cur_blk->offset + cur_blk->len < nblk->offset) && - GetAbsLastAck(stream) >= (cur_blk->offset + cur_blk->len)) { + GetAbsLastAck(stream) > (cur_blk->offset + cur_blk->len)) { return true; } return false;