mirror of https://github.com/OpenIPC/firmware.git
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
diff -drupN a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
|
|
--- a/net/ipv4/tcp_output.c 2018-08-06 17:23:04.000000000 +0300
|
|
+++ b/net/ipv4/tcp_output.c 2022-06-12 05:28:14.000000000 +0300
|
|
@@ -193,7 +193,7 @@ u32 tcp_default_init_rwnd(u32 mss)
|
|
* (RFC 3517, Section 4, NextSeg() rule (2)). Further place a
|
|
* limit when mss is larger than 1460.
|
|
*/
|
|
- u32 init_rwnd = TCP_INIT_CWND * 2;
|
|
+ u32 init_rwnd = sysctl_tcp_default_init_rwnd;
|
|
|
|
if (mss > 1460)
|
|
init_rwnd = max((1460 * init_rwnd) / mss, 2U);
|
|
@@ -3293,23 +3293,11 @@ static int tcp_send_syn_data(struct sock
|
|
{
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct tcp_fastopen_request *fo = tp->fastopen_req;
|
|
- int syn_loss = 0, space, err = 0;
|
|
- unsigned long last_syn_loss = 0;
|
|
+ int space, err = 0;
|
|
struct sk_buff *syn_data;
|
|
|
|
tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */
|
|
- tcp_fastopen_cache_get(sk, &tp->rx_opt.mss_clamp, &fo->cookie,
|
|
- &syn_loss, &last_syn_loss);
|
|
- /* Recurring FO SYN losses: revert to regular handshake temporarily */
|
|
- if (syn_loss > 1 &&
|
|
- time_before(jiffies, last_syn_loss + (60*HZ << syn_loss))) {
|
|
- fo->cookie.len = -1;
|
|
- goto fallback;
|
|
- }
|
|
-
|
|
- if (sysctl_tcp_fastopen & TFO_CLIENT_NO_COOKIE)
|
|
- fo->cookie.len = -1;
|
|
- else if (fo->cookie.len <= 0)
|
|
+ if (!tcp_fastopen_cookie_check(sk, &tp->rx_opt.mss_clamp, &fo->cookie))
|
|
goto fallback;
|
|
|
|
/* MSS for SYN-data is based on cached MSS and bounded by PMTU and
|