Skip to content

Commit 0826660

Browse files
committed
tgupdate: merge t/DO-NOT-MERGE-mptcp-enabled-by-default into t/upstream base
2 parents 336b3bd + 7c4e93d commit 0826660

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

net/ipv4/tcp.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3693,7 +3693,7 @@ EXPORT_SYMBOL(tcp_sock_set_keepcnt);
36933693

36943694
int tcp_set_window_clamp(struct sock *sk, int val)
36953695
{
3696-
u32 old_window_clamp, new_window_clamp;
3696+
u32 old_window_clamp, new_window_clamp, new_rcv_ssthresh;
36973697
struct tcp_sock *tp = tcp_sk(sk);
36983698

36993699
if (!val) {
@@ -3714,12 +3714,12 @@ int tcp_set_window_clamp(struct sock *sk, int val)
37143714
/* Need to apply the reserved mem provisioning only
37153715
* when shrinking the window clamp.
37163716
*/
3717-
if (new_window_clamp < old_window_clamp)
3717+
if (new_window_clamp < old_window_clamp) {
37183718
__tcp_adjust_rcv_ssthresh(sk, new_window_clamp);
3719-
else
3720-
tp->rcv_ssthresh = clamp(new_window_clamp,
3721-
tp->rcv_ssthresh,
3722-
tp->rcv_wnd);
3719+
} else {
3720+
new_rcv_ssthresh = min(tp->rcv_wnd, new_window_clamp);
3721+
tp->rcv_ssthresh = max(new_rcv_ssthresh, tp->rcv_ssthresh);
3722+
}
37233723
return 0;
37243724
}
37253725

0 commit comments

Comments
 (0)