mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
d8e8052e42
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
19 lines
411 B
C
19 lines
411 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/bpf.h>
|
|
#include <linux/types.h>
|
|
#include <bpf/bpf_helpers.h>
|
|
#include <bpf/bpf_tracing.h>
|
|
#include "bpf_tcp_helpers.h"
|
|
|
|
char _license[] SEC("license") = "X";
|
|
|
|
void BPF_STRUCT_OPS(nogpltcp_init, struct sock *sk)
|
|
{
|
|
}
|
|
|
|
SEC(".struct_ops")
|
|
struct tcp_congestion_ops bpf_nogpltcp = {
|
|
.init = (void *)nogpltcp_init,
|
|
.name = "bpf_nogpltcp",
|
|
};
|