]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: detect retransmissions on timewait state
authorVictor Julien <victor@inliniac.net>
Tue, 16 Oct 2012 13:53:48 +0000 (15:53 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 16 Oct 2012 13:53:48 +0000 (15:53 +0200)
src/stream-tcp.c

index fd504c18a6a3aaaadba0a6b5def12aa24437d703..c4d463ec2dca829c069dccd65355c245e9919b88 100644 (file)
@@ -3576,6 +3576,9 @@ static int StreamTcpPacketStateTimeWait(ThreadVars *tv, Packet *p,
                 if (p->payload_len > 0 && TCP_GET_SEQ(p) == ssn->server.last_ack) {
                     SCLogDebug("ssn %p: -> retransmission", ssn);
                     retransmission = 1;
+                } else if (p->payload_len > 0 && SEQ_LEQ((TCP_GET_SEQ(p) + p->payload_len), ssn->server.last_ack)) {
+                    SCLogDebug("ssn %p: -> retransmission", ssn);
+                    retransmission = 1;
                 } else {
                     SCLogDebug("ssn %p: -> SEQ mismatch, packet SEQ %" PRIu32 ""
                             " != %" PRIu32 " from stream", ssn,