]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
bpf: Allow SO_BINDTODEVICE opt in bpf_setsockopt
authorFerenc Fejes <fejes@inf.elte.hu>
Sat, 30 May 2020 21:09:01 +0000 (23:09 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:57:14 +0000 (14:57 -0700)
commit70c58997c1e864c96dfdf072572047303db8f42a
treefaa56d742c1bd4f6091fbdd535a043354eae0387
parent8ea204c2b658eaef55b4716fde469fb66c589a3d
bpf: Allow SO_BINDTODEVICE opt in bpf_setsockopt

Extending the supported sockopts in bpf_setsockopt with
SO_BINDTODEVICE. We call sock_bindtoindex with parameter
lock_sk = false in this context because we already owning
the socket.

Signed-off-by: Ferenc Fejes <fejes@inf.elte.hu>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/4149e304867b8d5a606a305bc59e29b063e51f49.1590871065.git.fejes@inf.elte.hu
net/core/filter.c