Re: [PATCH net] udp_tunnel: drop packets when hibernating
From: Jason A. Donenfeld
Date: Sat Oct 10 2026 - 17:49:46 EST
On Thu, Oct 8, 2026 at 11:03 PM Willem de Bruijn
<willemdebruijn.kernel@xxxxxxxxx> wrote:
> Since this is an issue specific with security protocols and reuse of
> their state across freeze and restore, is that the more suitable
> location for this check? Drop transmit of packets with that risk
> (unique for that connection nonce) only, if freezing.
I was thinking this is a pretty common problem to UDP apps in general,
and it's confusing to have these sorts of replays due to hibernation
that userspace doesn't have. It's an odd problem to expect every
in-kernel user to fix independently, so maybe it'd be more clever to
do this all in one place. I can put it in only wireguard, instead, if
you feel really strongly about it. But I was thinking this just seemed
like an odd behavior difference that could be easily fixed for
everyone.
> udp_queue_rcv_one_skb is the UDP hot path. Since it touches all
> packets, the last resort for adding checks that are relevant too only
> a small subset of packets.
Is there another way you'd suggest doing this? Some other trick for
disabling the socket? I also am not keen on adding branches to hot
paths.
Jason