]> 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 07:38:22 +0000 (09:38 +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.

src/stream-tcp-reassemble.c

index d3de6c054ed1fe861a365367b535e886fdf2a42e..bb793cf8e830dd632e624bb9e113bdf560d1e7e9 100644 (file)
@@ -1015,7 +1015,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;