summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-06 21:16:26 -0800
committerDave Barach <openvpp@barachs.net>2019-03-08 20:03:54 +0000
commit679b78f7155b18efa690b0d2a4a0b51c00090522 (patch)
tree10897d5994baff48303b4081e5404841a3ba62fe /src
parent14ed6df9006b1266d075ac0af248cb04ebc558d9 (diff)
tcp: fix rcv_wnd computation
Change-Id: I3cecffae2e30233d4725bd3eaf5ff4a8ff194fae Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/tcp/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
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;
}