Re: [PATCH net v4] Fix race for duplicate reqsk on identical SYN
From: Eric Dumazet
Date: Mon Jun 24 2024 - 09:57:20 EST
On Fri, Jun 21, 2024 at 3:39 AM luoxuanqiang <luoxuanqiang@xxxxxxxxxx> wrote:
>
> When bonding is configured in BOND_MODE_BROADCAST mode, if two identical
> SYN packets are received at the same time and processed on different CPUs,
> it can potentially create the same sk (sock) but two different reqsk
> (request_sock) in tcp_conn_request().
>
> These two different reqsk will respond with two SYNACK packets, and since
> the generation of the seq (ISN) incorporates a timestamp, the final two
> SYNACK packets will have different seq values.
>
> The consequence is that when the Client receives and replies with an ACK
> to the earlier SYNACK packet, we will reset(RST) it.
>
> ========================================================================
>
Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx>