From: David Ahern <dsahern@kernel.org>
To: Rastislav Szabo <rastislav.szabo@isovalent.com>, netdev@vger.kernel.org
Cc: edumazet@google.com, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, shuah@kernel.org, dima@arista.com,
linux-kselftest@vger.kernel.org,
Dmitry Safonov <0x7f454c46@gmail.com>
Subject: Re: [PATCH net 1/2] net/tcp: fix TCP-AO key deletion in VRFs
Date: Fri, 21 Aug 2026 12:33:59 -0600 [thread overview]
Message-ID: <17fac875-ce43-43ec-9e9d-329a09d4f3eb@kernel.org> (raw)
In-Reply-To: <20260821153823.266343-1-rastislav.szabo@isovalent.com>
On 8/21/26 9:38 AM, Rastislav Szabo wrote:
> TCP-AO keys with TCP_AO_KEYF_IFINDEX store the VRF L3 interface index in
> l3index. tcp_ao_del_cmd() validates the supplied ifindex, but does not
> assign it to its local l3index before matching keys.
>
> As a result, deleting a key scoped to a non-default VRF always fails with
> ENOENT because it is matched against l3index 0.
>
> Fixes: 248411b8cb89 ("net/tcp: Wire up l3index to TCP-AO")
> Cc: stable@vger.kernel.org
> Signed-off-by: Rastislav Szabo <rastislav.szabo@isovalent.com>
> ---
> net/ipv4/tcp_ao.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/net/ipv4/tcp_ao.c b/net/ipv4/tcp_ao.c
> index 5094267447ae..26864621e6de 100644
> --- a/net/ipv4/tcp_ao.c
> +++ b/net/ipv4/tcp_ao.c
> @@ -1834,6 +1834,9 @@ static int tcp_ao_del_cmd(struct sock *sk, unsigned short int family,
> if (cmd.ifindex && !(cmd.keyflags & TCP_AO_KEYF_IFINDEX))
> return -EINVAL;
>
> + if (cmd.keyflags & TCP_AO_KEYF_IFINDEX)
> + l3index = cmd.ifindex;
> +
> ao_info = setsockopt_ao_info(sk);
> if (IS_ERR(ao_info))
> return PTR_ERR(ao_info);
>
> base-commit: 746fc0787f616da418ffc04a110296fe95d53491
Looks correct to me. Dmitry?
Reviewed-by: David Ahern <dsahern@kernel.org>
next prev parent reply other threads:[~2026-08-21 18:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-21 15:38 [PATCH net 1/2] net/tcp: fix TCP-AO key deletion in VRFs Rastislav Szabo
2026-08-21 15:38 ` [PATCH net 2/2] selftests: net: tcp_ao: test VRF-scoped key deletion Rastislav Szabo
2026-08-21 18:35 ` David Ahern
2026-08-22 4:02 ` Dmitry Safonov
2026-08-21 18:33 ` David Ahern [this message]
2026-08-22 3:53 ` [PATCH net 1/2] net/tcp: fix TCP-AO key deletion in VRFs Dmitry Safonov
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=17fac875-ce43-43ec-9e9d-329a09d4f3eb@kernel.org \
--to=dsahern@kernel.org \
--cc=0x7f454c46@gmail.com \
--cc=davem@davemloft.net \
--cc=dima@arista.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rastislav.szabo@isovalent.com \
--cc=shuah@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.