]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: fix GAP check
authorVictor Julien <vjulien@oisf.net>
Mon, 27 Jun 2022 09:34:14 +0000 (11:34 +0200)
committerVictor Julien <vjulien@oisf.net>
Wed, 29 Jun 2022 17:58:50 +0000 (19:58 +0200)
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

index 01306a802e032b486ff64eccc47e213fcc75d30b..670182111c259c37aac92ca2c063e7006cd01a50 100644 (file)
@@ -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;