Netdev List
 help / color / mirror / Atom feed
From: "Daniel Zahka" <daniel.zahka@gmail.com>
To: "Todd Bert Freed" <toddfreed@meta.com>,
	"Daniel Zahka" <daniel.zahka@gmail.com>
Cc: <netdev@vger.kernel.org>, "Jakub Kicinski" <kuba@kernel.org>,
	"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Simon Horman" <horms@kernel.org>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"Shuah Khan" <shuah@kernel.org>,
	"Rahul Rameshbabu" <rrameshbabu@nvidia.com>,
	"Raed Salem" <raeds@nvidia.com>,
	"Cosmin Ratiu" <cratiu@nvidia.com>,
	<linux-kselftest@vger.kernel.org>
Subject: Re: [PATCH net 0/2] psp: drop packets with extension headers in transport mode
Date: Thu, 22 Oct 2026 08:06:37 -0400	[thread overview]
Message-ID: <DMBCRFEQZ7D8.1SQ5SSTSTGZFR@gmail.com> (raw)
In-Reply-To: <CADh2yMypAdV07rRufDqj1aOdEzAqEaH2bDkJ2jYV_z1_9iXRkg@mail.gmail.com>

On Wed Oct 21, 2026 at 7:16 PM EDT, Todd Bert Freed wrote:
> On Wed, Oct 21, 2026 at 3:07 PM Daniel Zahka <daniel.zahka@gmail.com> wrote:
>> >
>> > The first patch drops the packets, the second patch adds selftests for
>> > that case.
>> >
>>
>> Why not just fix psp_dev_encapsulate() to put the psp headers in the
>> right position? With the self test we are going to make PSP + ipv6 ext
>> header == drop part of the uapi?
>
> If the original ipv6 packet has extension headers, then the nexthdr on the
> fixed ipv6 header identifies the first extension header, and the L4 proto is
> in the nexthdr on the last one in the chain.
>
> psp_dev_encapsulate() places the udp+psp headers after all the extension
> headers in this case.
>
> The issue is that it rewrites the fixed ipv6 header nexthdr to be UDP,
>
>   ipv6_hdr(skb)->nexthdr = IPPROTO_UDP;
>
> It would need to walk the chain, and set the nexthdr on the final extension
> header to UDP, instead, if the correct policy were for udp+psp to come
> after the extension headers in all cases.
>
> I'm not sure that's the correct policy though ; for some headers (e.g. the
> fragment header) it might make sense to leave them on the inner packet.
> Note that the psp spec does not describe this. Perhaps the user should
> express the desired policy?
>
> Explicitly dropping ipv6 packets with fragments is consistent with the
> current behavior (it already doesn't work).
>
> -Todd

I think walking the extension headers and inserting before the transport
header is better than dropping. I agree with Bjorn that rejecting
fragment header makes sense because the receiver can't decrypt the
fragmented PSP payload.

  parent reply	other threads:[~2026-10-22 12:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21 21:01 [PATCH net 0/2] psp: drop packets with extension headers in transport mode Todd Freed
2026-10-21 21:01 ` [PATCH net 1/2] psp: drop transport mode packets with extension headers Todd Freed
2026-10-25 21:30   ` netdev-bot+sashiko
2026-10-21 21:02 ` [PATCH net 2/2] selftests: drv-net: psp: test ipv6 tcp socket " Todd Freed
2026-10-25 21:30   ` netdev-bot+sashiko
2026-10-21 22:07 ` [PATCH net 0/2] psp: drop packets with extension headers in transport mode Daniel Zahka
2026-10-21 23:16   ` Todd Bert Freed
2026-10-22 11:59     ` Björn Töpel
2026-10-22 12:06     ` Daniel Zahka [this message]
2026-10-22 22:43       ` Todd Bert Freed
2026-10-22 15:19 ` Willem de Bruijn
2026-10-22 16:58   ` Todd Bert Freed
2026-10-22 20:35     ` Willem de Bruijn

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=DMBCRFEQZ7D8.1SQ5SSTSTGZFR@gmail.com \
    --to=daniel.zahka@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=raeds@nvidia.com \
    --cc=rrameshbabu@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=toddfreed@meta.com \
    --cc=willemdebruijn.kernel@gmail.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