diff options
| author | Craig Gallek <kraig@google.com> | 2016-01-04 17:41:47 -0500 |
|---|---|---|
| committer | Michael Bestas <mkbestas@lineageos.org> | 2022-04-19 00:49:57 +0300 |
| commit | acc4e8388aadd10da210bd56d3ffec8a8a217994 (patch) | |
| tree | 55336db5c9f0b808e437c65ad362afd145f3b1c2 /include/linux | |
| parent | 6a594c47d15209b49b6d322c89f4e68ece07e5f7 (diff) | |
soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF
Expose socket options for setting a classic or extended BPF program
for use when selecting sockets in an SO_REUSEPORT group. These options
can be used on the first socket to belong to a group before bind or
on any socket in the group after bind.
This change includes refactoring of the existing sk_filter code to
allow reuse of the existing BPF filter validation checks.
Signed-off-by: Craig Gallek <kraig@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chatur27 <jasonbright2709@gmail.com>
Change-Id: I4433dfd5d865bb69e8d3cab55cc68325829e8b49
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/filter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index ccb98b459c59..7c2733263258 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -453,6 +453,8 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk); int __sk_attach_filter(struct sock_fprog *fprog, struct sock *sk, bool locked); int sk_attach_bpf(u32 ufd, struct sock *sk); +int sk_reuseport_attach_filter(struct sock_fprog *fprog, struct sock *sk); +int sk_reuseport_attach_bpf(u32 ufd, struct sock *sk); int sk_detach_filter(struct sock *sk); int __sk_detach_filter(struct sock *sk, bool locked); |
