]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream/midstream: be more liberal with window
authorVictor Julien <victor@inliniac.net>
Wed, 17 Jan 2018 12:04:54 +0000 (13:04 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 17 Jan 2018 13:48:37 +0000 (14:48 +0100)
Use the wscale setting when updating the window, even if it's very
high.

src/stream-tcp.c

index e1be94a85e8acbd5b4c12f2eb1ac5e5af221ce02..aebad500750c453f5d5e602e94a9fbf9f7c487f3 100644 (file)
@@ -2210,7 +2210,7 @@ static int HandleEstablishedPacketToClient(ThreadVars *tv, TcpSession *ssn, Pack
     if ((ssn->flags & STREAMTCP_FLAG_MIDSTREAM) &&
             (ssn->flags & STREAMTCP_FLAG_MIDSTREAM_ESTABLISHED))
     {
-        ssn->server.window = TCP_GET_WINDOW(p);
+        ssn->server.window = TCP_GET_WINDOW(p) << ssn->server.wscale;
         ssn->server.next_win = ssn->server.last_ack + ssn->server.window;
         ssn->flags &= ~STREAMTCP_FLAG_MIDSTREAM_ESTABLISHED;
         SCLogDebug("ssn %p: adjusted midstream ssn->server.next_win to "