[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231124214542.GC50352@kernel.org>
Date: Fri, 24 Nov 2023 21:45:42 +0000
From: Simon Horman <horms@...nel.org>
To: Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 net-next 5/8] tcp: Don't initialise tp->tsoffset in
tcp_get_cookie_sock().
On Wed, Nov 22, 2023 at 05:25:18PM -0800, Kuniyuki Iwashima wrote:
> When we create a full socket from SYN Cookie, we initialise
> tcp_sk(sk)->tsoffset redundantly in tcp_get_cookie_sock() as
> the field is inherited from tcp_rsk(req)->ts_off.
>
> cookie_v[46]_check
> |- treq->ts_off = 0
> `- tcp_get_cookie_sock
> |- tcp_v[46]_syn_recv_sock
> | `- tcp_create_openreq_child
> | `- newtp->tsoffset = treq->ts_off
> `- tcp_sk(child)->tsoffset = tsoff
>
> Let's initialise tcp_rsk(req)->ts_off with the correct offset
> and remove the second initialisation of tcp_sk(sk)->tsoffset.
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists