diff options
| author | David S. Miller <davem@davemloft.net> | 2023-11-16 23:35:12 +0000 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2023-11-16 23:35:12 +0000 |
| commit | 9a1f02f3ef96bd83162e94e4ee34a4f8240256ba (patch) | |
| tree | c173673d5fb2dc3dd62efba9e2cc6d4fc5b015a9 /net/ipv4/tcp_timer.c | |
| parent | c6e9dba3be5ef3b701b29b143609561915e5d0e9 (diff) | |
| parent | 0a8de364ff7a14558e9676f424283148110384d6 (diff) | |
Merge branch 'tcp-change-reaction-to-ICMP'
Eric Dumazet says:
====================
tcp: change reaction to ICMP messages
ICMP[v6] messages received for a socket in TCP_SYN_SENT currently abort
the connection attempt, in violation of standards.
This series changes our stack to adhere to RFC 6069 and RFC 1122
(4.2.3.9)
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
| -rw-r--r-- | net/ipv4/tcp_timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 1f9f6c1c196b..d1ad20ce1c8c 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -626,7 +626,6 @@ void tcp_retransmit_timer(struct sock *sk) * implemented ftp to mars will work nicely. We will have to fix * the 120 second clamps though! */ - icsk->icsk_backoff++; out_reset_timer: /* If stream is thin, use linear timeouts. Since 'icsk_backoff' is @@ -647,11 +646,12 @@ out_reset_timer: tcp_rto_min(sk), TCP_RTO_MAX); } else if (sk->sk_state != TCP_SYN_SENT || - icsk->icsk_backoff > + tp->total_rto > READ_ONCE(net->ipv4.sysctl_tcp_syn_linear_timeouts)) { /* Use normal (exponential) backoff unless linear timeouts are * activated. */ + icsk->icsk_backoff++; icsk->icsk_rto = min(icsk->icsk_rto << 1, TCP_RTO_MAX); } inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, |
