OSDN Git Service

bpf, selftests: Add redirect_peer selftest
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 10 Oct 2020 23:40:06 +0000 (01:40 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 11 Oct 2020 17:21:04 +0000 (10:21 -0700)
commit9f4c53ca23a28c891d2bd3ff4738f7d95ba0303b
treec6559345e3b01dbd0ab5a39bad0e73ec1bb5b263
parent57a73fe7c1988ae726de23ee7c3c49ca82221751
bpf, selftests: Add redirect_peer selftest

Extend the test_tc_redirect test and add a small test that exercises the new
redirect_peer() helper for the IPv4 and IPv6 case.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201010234006.7075-7-daniel@iogearbox.net
tools/testing/selftests/bpf/progs/test_tc_peer.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_tc_redirect.sh