soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF
authorCraig Gallek <kraig@google.com>
Mon, 4 Jan 2016 22:41:47 +0000 (17:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jan 2016 03:49:59 +0000 (22:49 -0500)
commit538950a1b7527a0a52ccd9337e3fcd304f027f13
tree2ecd86127a55719e61ea9a37aeb1cc7be8022d0f
parente32ea7e747271a0abcd37e265005e97cc81d9df5
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>
22 files changed:
arch/alpha/include/uapi/asm/socket.h
arch/avr32/include/uapi/asm/socket.h
arch/frv/include/uapi/asm/socket.h
arch/ia64/include/uapi/asm/socket.h
arch/m32r/include/uapi/asm/socket.h
arch/mips/include/uapi/asm/socket.h
arch/mn10300/include/uapi/asm/socket.h
arch/parisc/include/uapi/asm/socket.h
arch/powerpc/include/uapi/asm/socket.h
arch/s390/include/uapi/asm/socket.h
arch/sparc/include/uapi/asm/socket.h
arch/xtensa/include/uapi/asm/socket.h
include/linux/filter.h
include/net/sock_reuseport.h
include/net/udp.h
include/uapi/asm-generic/socket.h
net/core/filter.c
net/core/sock.c
net/core/sock_reuseport.c
net/ipv4/udp.c
net/ipv4/udp_diag.c
net/ipv6/udp.c