Skip to content
Commit 909172a1 authored by Mao Wenan's avatar Mao Wenan Committed by Jakub Kicinski
Browse files

net: Update window_clamp if SOCK_RCVBUF is set

When net.ipv4.tcp_syncookies=1 and syn flood is happened,
cookie_v4_check or cookie_v6_check tries to redo what
tcp_v4_send_synack or tcp_v6_send_synack did,
rsk_window_clamp will be changed if SOCK_RCVBUF is set,
which will make rcv_wscale is different, the client
still operates with initial window scale and can overshot
granted window, the client use the initial scale but local
server use new scale to advertise window value, and session
work abnormally.

Fixes: e88c64f0

 ("tcp: allow effective reduction of TCP's rcv-buffer via setsockopt")
Signed-off-by: default avatarMao Wenan <wenan.mao@linux.alibaba.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/1604967391-123737-1-git-send-email-wenan.mao@linux.alibaba.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent f3037c5a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment