tcp: fix rcv_wnd computation 95/18095/3
authorFlorin Coras <fcoras@cisco.com>
Thu, 7 Mar 2019 05:16:26 +0000 (21:16 -0800)
committerDave Barach <openvpp@barachs.net>
Fri, 8 Mar 2019 20:03:54 +0000 (20:03 +0000)
Change-Id: I3cecffae2e30233d4725bd3eaf5ff4a8ff194fae
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/tcp/tcp_output.c

index 2f728cc..5a5c7fe 100644 (file)
@@ -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;
     }