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 [off-list ref] wrote:
quoted
quoted
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.