]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
wireguard: selftests: actually test for routing loops
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 29 Nov 2021 15:39:22 +0000 (10:39 -0500)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 9 Dec 2021 10:10:39 +0000 (11:10 +0100)
commit2be35621881fb54d2b3ddfb050e95c9395c148e9
treec060a5971acaeea6118799dfaefc5c8348fdd770
parentf9b7664a6ded100278d9878d83c0308a33a8a683
wireguard: selftests: actually test for routing loops

BugLink: https://bugs.launchpad.net/bugs/1953731
commit 782c72af567fc2ef09bd7615d0307f24de72c7e0 upstream.

We previously removed the restriction on looping to self, and then added
a test to make sure the kernel didn't blow up during a routing loop. The
kernel didn't blow up, thankfully, but on certain architectures where
skb fragmentation is easier, such as ppc64, the skbs weren't actually
being discarded after a few rounds through. But the test wasn't catching
this. So actually test explicitly for massive increases in tx to see if
we have a routing loop. Note that the actual loop problem will need to
be addressed in a different commit.

Fixes: b673e24aad36 ("wireguard: socket: remove errant restriction on looping to self")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
tools/testing/selftests/wireguard/netns.sh