aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/bpf/progs/lsm_cgroup_nonvoid.c
blob: 6cb0f161f4172b0e3f2db4cdd48c328470b8f156 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// SPDX-License-Identifier: GPL-2.0

#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>

char _license[] SEC("license") = "GPL";

SEC("lsm_cgroup/inet_csk_clone")
int BPF_PROG(nonvoid_socket_clone, struct sock *newsk, const struct request_sock *req)
{
	/* Can not return any errors from void LSM hooks. */
	return 0;
}