]> Git Repo - linux.git/commit
tcp: restore rcv_wscale in a repair mode (v2)
authorAndrey Vagin <[email protected]>
Wed, 19 Sep 2012 09:40:00 +0000 (09:40 +0000)
committerDavid S. Miller <[email protected]>
Thu, 20 Sep 2012 21:49:58 +0000 (17:49 -0400)
commitbc26ccd8fc756749de95606d28314efd0ce5aec3
tree7415996141c9777b09f0d33ca90283bc44a40632
parent8ea853fd0b721f14eacff1a5b364fe3e60d2dd82
tcp: restore rcv_wscale in a repair mode (v2)

rcv_wscale is a symetric parameter with snd_wscale.

Both this parameters are set on a connection handshake.

Without this value a remote window size can not be interpreted correctly,
because a value from a packet should be shifted on rcv_wscale.

And one more thing is that wscale_ok should be set too.

This patch doesn't break a backward compatibility.
If someone uses it in a old scheme, a rcv window
will be restored with the same bug (rcv_wscale = 0).

v2: Save backward compatibility on big-endian system. Before
    the first two bytes were snd_wscale and the second two bytes were
    rcv_wscale. Now snd_wscale is opt_val & 0xFFFF and rcv_wscale >> 16.
    This approach is independent on byte ordering.

Cc: David S. Miller <[email protected]>
Cc: Alexey Kuznetsov <[email protected]>
Cc: James Morris <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]>
Cc: Patrick McHardy <[email protected]>
CC: Pavel Emelyanov <[email protected]>
Signed-off-by: Andrew Vagin <[email protected]>
Acked-by: Pavel Emelyanov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv4/tcp.c
This page took 0.055466 seconds and 4 git commands to generate.