]> git.baikalelectronics.ru Git - 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)
committerJakub Kicinski <kuba@kernel.org>
Tue, 30 Nov 2021 03:50:29 +0000 (19:50 -0800)
commit87e306482d1cfa9ece3b03fe0742e035953df4e9
treeba46b7e2b66cd8322d2400bb870efadf98bcfa47
parent3e9c971da079abd28b8c7cc29eb4d81b518af2ab
wireguard: selftests: actually test for routing loops

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: c62450e60bca ("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>
tools/testing/selftests/wireguard/netns.sh