From acc4e8388aadd10da210bd56d3ffec8a8a217994 Mon Sep 17 00:00:00 2001 From: Craig Gallek Date: Mon, 4 Jan 2016 17:41:47 -0500 Subject: 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 Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller Signed-off-by: Chatur27 Change-Id: I4433dfd5d865bb69e8d3cab55cc68325829e8b49 --- include/linux/filter.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') 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); -- cgit v1.2.3