diff options
author | Andrey Ignatov <rdna@fb.com> | 2018-05-25 18:55:25 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-28 18:41:03 +0300 |
commit | 72481f398c4fc6ca32013310c3dec0ef3e6e5bf2 (patch) | |
tree | 15b8bf8b3eeaa8c89a26beff34eeebed986ff874 /tools/lib/bpf/libbpf.c | |
parent | 3024cf8248c49d9c57f56f6b650e8693f6e1bb57 (diff) | |
download | linux-72481f398c4fc6ca32013310c3dec0ef3e6e5bf2.tar.xz |
libbpf: Support guessing sendmsg{4,6} progs
libbpf can guess prog type and expected attach type based on section
name. Add hints for "cgroup/sendmsg4" and "cgroup/sendmsg6" section
names.
Signed-off-by: Andrey Ignatov <rdna@fb.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index d20411ebfa2f..b1a60ac8424e 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -2043,6 +2043,8 @@ static const struct { BPF_SA_PROG_SEC("cgroup/bind6", BPF_CGROUP_INET6_BIND), BPF_SA_PROG_SEC("cgroup/connect4", BPF_CGROUP_INET4_CONNECT), BPF_SA_PROG_SEC("cgroup/connect6", BPF_CGROUP_INET6_CONNECT), + BPF_SA_PROG_SEC("cgroup/sendmsg4", BPF_CGROUP_UDP4_SENDMSG), + BPF_SA_PROG_SEC("cgroup/sendmsg6", BPF_CGROUP_UDP6_SENDMSG), BPF_S_PROG_SEC("cgroup/post_bind4", BPF_CGROUP_INET4_POST_BIND), BPF_S_PROG_SEC("cgroup/post_bind6", BPF_CGROUP_INET6_POST_BIND), }; |