From: Florin Coras Date: Thu, 7 Mar 2019 05:16:26 +0000 (-0800) Subject: tcp: fix rcv_wnd computation X-Git-Tag: v19.04-rc1~272 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=679b78f7155b18efa690b0d2a4a0b51c00090522;p=vpp.git tcp: fix rcv_wnd computation Change-Id: I3cecffae2e30233d4725bd3eaf5ff4a8ff194fae Signed-off-by: Florin Coras --- diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c index 2f728cc7333..5a5c7fe4b8b 100644 --- a/src/vnet/tcp/tcp_output.c +++ b/src/vnet/tcp/tcp_output.c @@ -172,7 +172,7 @@ tcp_update_rcv_wnd (tcp_connection_t * tc) /* Make sure we have a multiple of rcv_wscale */ if (wnd && tc->rcv_wscale) { - wnd &= ~(1 << tc->rcv_wscale); + wnd &= ~((1 << tc->rcv_wscale) - 1); if (wnd == 0) wnd = 1 << tc->rcv_wscale; }