mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Safonov <0x7f454c46@gmail.com>
To: Hungyu Lin <dennylin0707@gmail.com>
Cc: edumazet@kernel.org, ncardwell@google.com, kuniyu@google.com,
	 davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org,
	pabeni@redhat.com,  horms@kernel.org, fruggeri@arista.com,
	noureddine@arista.com,  netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net] net/tcp-ao: fix reset key lookup for IPv4 segments on IPv6 listeners
Date: Tue, 24 Nov 2026 01:37:54 +0000	[thread overview]
Message-ID: <CAJwJo6a8ERv3ua02u4hU++zENBUFftDX4KrabX91Py0LGPF9Kw@mail.gmail.com> (raw)
In-Reply-To: <20261123034047.56745-1-dennylin0707@gmail.com>

On Mon, 23 Nov 2026 at 03:41, Hungyu Lin <dennylin0707@gmail.com> wrote:
>
> tcp_ao_prepare_reset() looks up the key for a reset that is sent on
> behalf of a listener by the address of the peer. It takes that address
> from the IPv6 header whenever the listener is an AF_INET6 socket, also
> when the segment is an IPv4 one that arrived on a dual-stack listener.
> The address is then read from the middle of the IPv4 header, the key of
> the peer is not found and the reset is not sent.
>
> The v4-mapped check that follows does not help: it looks at
> sk->sk_v6_daddr, which is the unspecified address for a listener, and
> it runs after the address has been picked.
>
> Take the family and the address from the protocol of the segment
> instead of the family of the socket.
>
> Fixes: 06b22ef29591 ("net/tcp: Wire TCP-AO to request sockets")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>

Acked-by: Dmitry Safonov <0x7f454c46@gmail.com>

Thanks! IPv4 on dual-stack sockets historically got less test
coverage, unfortunately. Eric's proposal to cover it with selftests in
net-next would be ideal, unsure how easy it would be to add not only
IPv6- and IPv4-centered tests, but also the mixed ones.

Thanks,
             Dmitry

      parent reply	other threads:[~2026-11-24  1:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23  3:40 Hungyu Lin
2026-11-23  3:42 ` netdev-bot+sinfo
2026-11-23  9:35 ` Eric Dumazet
2026-11-24  1:37 ` Dmitry Safonov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJwJo6a8ERv3ua02u4hU++zENBUFftDX4KrabX91Py0LGPF9Kw@mail.gmail.com \
    --to=0x7f454c46@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dennylin0707@gmail.com \
    --cc=dsahern@kernel.org \
    --cc=edumazet@kernel.org \
    --cc=fruggeri@arista.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=noureddine@arista.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®