Re: [PATCH net] wireguard: peer: free packets left on the per-peer queues on removal
From: Jason A. Donenfeld
Date: Tue Nov 10 2026 - 12:29:46 EST
On Sat, Oct 03, 2026 at 11:16:25PM +0300, Andrii Pasichnyk wrote:
> Reproduced with the WireGuard selftest VM (x86 KVM, 1 vCPU, net-next):
> remove a peer while a UDP flood keeps its receive queue busy, re-add it,
> repeat, then run the selftest's created/destroyed object check. Over
> 2140 removals the unpatched kernel leaked a peer and its keypair 5
> times ("wg0: Peer 27: merely created"); with this patch, 0 times in
> another 2140.
I'd be interested in seeing your adjustment to netns.sh so that I can
test this myself and validate various approaches. Do you have something
really minimal? Also, is this a test case that could be implemented
minimally enough that we could integrate this into netns.sh permanently?