Relax tcp.window_clamp value in INET restore
PATCH 1/1 Relax tcp.window_clamp value in INET restore
This value can grow higher than 16k, but it clamped at packet receive time if over that limit. Instead of failing here, just clamp to the same limit.
--- net/ipv4/checkpoint.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
net/ipv4/checkpoint.c +2 -4
@@ -429,10 +429,8 @@ static int inet_precheck(struct socket *sock, struct ckpt_hdr_socket_inet *in)/* do_tcp_setsockopt() quietly makes this coercion */ if (in->tcp.window_clamp < (SOCK_MIN_RCVBUF /2 )) in->tcp.window_clamp =SOCK_MIN_RCVBUF /2 ; -else if (in->tcp.window_clamp >65535U ) { -ckpt_debug ("invalid window_clamp value\n" ); -return -EINVAL ; - } +else + in->tcp.window_clamp =min (in->tcp.window_clamp,65535U );if (in->tcp.rcv_ssthresh > (4U * in->tcp.advmss)) in->tcp.rcv_ssthresh =4U * in->tcp.advmss;
Signature · 1 line
1.6.2.5
A message that is not in the archive (sent off-list or not yet received): 1259953399-8530-1-git-send-email-danms-r/[email protected]
Serge E. Hallyn
Tested-byQuoted 6 lines · Dan Smith
This value can grow higher than 16k, but it clamped at packet receive time if over that limit. Instead of failing here, just clamp to the same limit.
Signed-off-by Dan Smith <danms-r/[email protected]>Cc serue-r/[email protected]
Tested-by Serge Hallyn <serue-r/[email protected]>
Thanks, Dan.
-serge
Quoted 24 lines
--- net/ipv4/checkpoint.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)net/ipv4/checkpoint.c +2
-4@@ -429,10 +429,8 @@ static int inet_precheck(struct socket *sock, struct ckpt_hdr_socket_inet *in)/* do_tcp_setsockopt() quietly makes this coercion */ if (in->tcp.window_clamp < (SOCK_MIN_RCVBUF /2 )) in->tcp.window_clamp =SOCK_MIN_RCVBUF /2 ; -else if (in->tcp.window_clamp >65535U ) { -ckpt_debug ("invalid window_clamp value\n" ); -return -EINVAL ; - } +else + in->tcp.window_clamp =min (in->tcp.window_clamp,65535U );if (in->tcp.rcv_ssthresh > (4U * in->tcp.advmss)) in->tcp.rcv_ssthresh =4U * in->tcp.advmss;Signature · 1 line
1.6.2.5
Oren Laadan
AppliedQueued for ckpt-v19-rc3, thanks.
Oren.
Quoted 28 lines · Dan Smith
This value can grow higher than 16k, but it clamped at packet receive time if over that limit. Instead of failing here, just clamp to the same limit.
--- net/ipv4/checkpoint.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)net/ipv4/checkpoint.c +2
-4@@ -429,10 +429,8 @@ static int inet_precheck(struct socket *sock, struct ckpt_hdr_socket_inet *in)/* do_tcp_setsockopt() quietly makes this coercion */ if (in->tcp.window_clamp < (SOCK_MIN_RCVBUF /2 )) in->tcp.window_clamp =SOCK_MIN_RCVBUF /2 ; -else if (in->tcp.window_clamp >65535U ) { -ckpt_debug ("invalid window_clamp value\n" ); -return -EINVAL ; - } +else + in->tcp.window_clamp =min (in->tcp.window_clamp,65535U );if (in->tcp.rcv_ssthresh > (4U * in->tcp.advmss)) in->tcp.rcv_ssthresh =4U * in->tcp.advmss;