Re: [PATCH net] tcp: reset late connection after listening socket close
From: Asbjørn Sloth Tønnesen
Date: Sat Aug 08 2026 - 04:18:40 EST
On 8/7/26 9:05 PM, Kuniyuki Iwashima wrote:
On Fri, Aug 7, 2026 at 12:47 PM Asbjørn Sloth Tønnesen <ast@xxxxxxxxxxx> wrote:
[..]
+ if (sk->sk_state == TCP_CLOSE) {
+ tcp_v4_send_reset(newsk, skb, SK_RST_REASON_TCP_STATE);
+ goto put_and_exit;
+ }
What happens if the state changes here ?
+
if (__inet_inherit_port(sk, newsk) < 0)
goto put_and_exit;
-ENOENT should be checked to jump to a new label and
call req->rsk_ops->send_reset() there.
I will do that in v2, thanks.