Message ID | 20210409170237.274904-1-eric.dumazet@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | a7150e382267d5d2bb3e1a2a07776e97646b0952 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] Revert "tcp: Reset tcp connections in SYN-SENT state" | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net-next |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | warning | 2 maintainers not CCed: yoshfuji@linux-ipv6.org dsahern@kernel.org |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | warning | WARNING: Possible repeated word: 'Google' |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Fri, 9 Apr 2021 10:02:37 -0700 you wrote: > From: Eric Dumazet <edumazet@google.com> > > This reverts commit e880f8b3a24a73704731a7227ed5fee14bd90192. > > 1) Patch has not been properly tested, and is wrong [1] > 2) Patch submission did not include TCP maintainer (this is me) > > [...] Here is the summary with links: - [net-next] Revert "tcp: Reset tcp connections in SYN-SENT state" https://git.kernel.org/netdev/net-next/c/a7150e382267 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 627a472161fbcc7a2070993d2cda513dd18f08c7..e14fd0c50c10222b4b6b078b21e0b076343febff 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2888,7 +2888,7 @@ static inline bool tcp_need_reset(int state) { return (1 << state) & (TCPF_ESTABLISHED | TCPF_CLOSE_WAIT | TCPF_FIN_WAIT1 | - TCPF_FIN_WAIT2 | TCPF_SYN_RECV | TCPF_SYN_SENT); + TCPF_FIN_WAIT2 | TCPF_SYN_RECV); } static void tcp_rtx_queue_purge(struct sock *sk) @@ -2954,7 +2954,8 @@ int tcp_disconnect(struct sock *sk, int flags) */ tcp_send_active_reset(sk, gfp_any()); sk->sk_err = ECONNRESET; - } + } else if (old_state == TCP_SYN_SENT) + sk->sk_err = ECONNRESET; tcp_clear_xmit_timers(sk); __skb_queue_purge(&sk->sk_receive_queue);