[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241107042137.83415-1-kuniyu@amazon.com>
Date: Wed, 6 Nov 2024 20:21:37 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuniyu@...zon.com>
CC: <davem@...emloft.net>, <dsahern@...nel.org>, <edumazet@...gle.com>,
<horms@...nel.org>, <kerneljasonxing@...il.com>, <kernelxing@...cent.com>,
<kuba@...nel.org>, <netdev@...r.kernel.org>, <pabeni@...hat.com>
Subject: Re: [PATCH net-next] tcp: avoid RST in 3-way shakehands due to failure in tcp_timewait_state_process
From: Kuniyuki Iwashima <kuniyu@...zon.com>
Date: Wed, 6 Nov 2024 20:15:06 -0800
> From: Jason Xing <kerneljasonxing@...il.com>
> Date: Thu, 7 Nov 2024 11:16:04 +0800
> > > Here is how things happen in production:
> > > Time Client(A) Server(B)
> > > 0s SYN-->
> > > ...
> > > 132s <-- FIN
> > > ...
> > > 169s FIN-->
> > > 169s <-- ACK
> > > 169s SYN-->
> > > 169s <-- ACK
> >
> > I noticed the above ACK doesn't adhere to RFC 6191. It says:
> > "If the previous incarnation of the connection used Timestamps, then:
> > if ...
> > ...
> > * Otherwise, silently drop the incoming SYN segment, thus leaving
> > the previous incarnation of the connection in the TIME-WAIT
> > state.
> > "
> > But the timewait socket sends an ACK because of this code snippet:
> > tcp_timewait_state_process()
> > -> // the checks of SYN packet failed.
> > -> if (!th->rst) {
> > -> return TCP_TW_ACK; // this line can be traced back to 2005
>
> This is a challenge ACK following RFC 5961.
>
> If SYN is returned here, the client may lose the chance to RST the
> previous connection in TIME_WAIT.
s/returned/silently dropped/ :/
Powered by blists - more mailing lists