OSDN Git Service

bpf/selftests: Test that kernel rejects a TCP CC with an invalid license
authorToke Høiland-Jørgensen <toke@redhat.com>
Fri, 26 Mar 2021 10:03:14 +0000 (11:03 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 26 Mar 2021 16:51:02 +0000 (17:51 +0100)
commitd8e8052e42d0f8ff59898b9b4142b16958627ac9
tree8a7d383f253dff3af9705abaaf9852bea0929e5b
parent12aa8a9467b354ef893ce0fc5719a4de4949a9fb
bpf/selftests: Test that kernel rejects a TCP CC with an invalid license

This adds a selftest to check that the verifier rejects a TCP CC struct_ops
with a non-GPL license.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20210326100314.121853-2-toke@redhat.com
tools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c
tools/testing/selftests/bpf/progs/bpf_tcp_nogpl.c [new file with mode: 0644]