Re: [PATCH net] tcp: reset late connection after listening socket close

Asbjørn Sloth Tønnesen <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Message-ID <[email protected]>
On 8/7/26 9:05 PM, Kuniyuki Iwashima wrote:
> On Fri, Aug 7, 2026 at 12:47 PM Asbjørn Sloth Tønnesen <[email protected]> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.