]> git.baikalelectronics.ru Git - kernel.git/commit
wireguard: selftests: check that route_me_harder packets use the right sk
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 29 Oct 2020 02:56:05 +0000 (03:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 30 Oct 2020 11:57:38 +0000 (12:57 +0100)
commit87851fed92d5caefde6276dd223580a94ff3950a
treeb6b087a7f6e10292c2925314e14ecb3d1148a221
parent31266a5adde50a5c00504f5e6ee1072a92a86e6e
wireguard: selftests: check that route_me_harder packets use the right sk

If netfilter changes the packet mark, the packet is rerouted. The
ip_route_me_harder family of functions fails to use the right sk, opting
to instead use skb->sk, resulting in a routing loop when used with
tunnels. With the next change fixing this issue in netfilter, test for
the relevant condition inside our test suite, since wireguard was where
the bug was discovered.

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tools/testing/selftests/wireguard/netns.sh
tools/testing/selftests/wireguard/qemu/kernel.config