diff options
| author | Stanislav Fomichev <[email protected]> | 2020-07-06 23:01:25 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2020-07-07 23:03:31 +0000 |
| commit | f5836749c9c04a10decd2742845ad4870965fdef (patch) | |
| tree | 44335764c2ebba2099ba8bf26267bdfac7c36ed1 /tools/bpf/bpftool/common.c | |
| parent | mvpp2: fix pointer check (diff) | |
| download | kernel-f5836749c9c04a10decd2742845ad4870965fdef.tar.gz kernel-f5836749c9c04a10decd2742845ad4870965fdef.zip | |
bpf: Add BPF_CGROUP_INET_SOCK_RELEASE hook
Sometimes it's handy to know when the socket gets freed. In
particular, we'd like to try to use a smarter allocation of
ports for bpf_bind and explore the possibility of limiting
the number of SOCK_DGRAM sockets the process can have.
Implement BPF_CGROUP_INET_SOCK_RELEASE hook that triggers on
inet socket release. It triggers only for userspace sockets
(not in-kernel ones) and therefore has the same semantics as
the existing BPF_CGROUP_INET_SOCK_CREATE.
Signed-off-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/common.c')
0 files changed, 0 insertions, 0 deletions
