From: Victor Julien Date: Wed, 17 Jan 2018 12:04:54 +0000 (+0100) Subject: stream/midstream: be more liberal with window X-Git-Tag: suricata-4.1.0-beta1~352 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b24d965b8081c86759ef80080c50787d66f4727;p=thirdparty%2Fsuricata.git stream/midstream: be more liberal with window Use the wscale setting when updating the window, even if it's very high. --- 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 "