From 4b24d965b8081c86759ef80080c50787d66f4727 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 17 Jan 2018 13:04:54 +0100 Subject: [PATCH] stream/midstream: be more liberal with window Use the wscale setting when updating the window, even if it's very high. --- src/stream-tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream-tcp.c b/src/stream-tcp.c index e1be94a85e..aebad50075 100644 --- a/src/stream-tcp.c +++ b/src/stream-tcp.c @@ -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 " -- 2.47.2