libbpf: Support guessing post_bind{4,6} progs
authorAndrey Ignatov <rdna@fb.com>
Tue, 17 Apr 2018 17:28:45 +0000 (10:28 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Apr 2018 12:39:24 +0000 (14:39 +0200)
commit81efee75c4a8210cac6eb791892f974dfcfc24b0
tree076439a7ce9ba2a3c925e72f44c8265b40f11aa5
parent393de512e719a5fbd6712fc392a571ab287eb8ab
libbpf: Support guessing post_bind{4,6} progs

libbpf can guess prog type and expected attach type based on section
name. Add hints for "cgroup/post_bind4" and "cgroup/post_bind6" section
names.

Existing "cgroup/sock" is not changed, i.e. expected_attach_type for it
is not set to `BPF_CGROUP_INET_SOCK_CREATE`, for backward compatibility.

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c