]> git.baikalelectronics.ru Git - kernel.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)
commitbf02402702f497e3c4b94d53577e770c638bc09a
treefaa56d742c1bd4f6091fbdd535a043354eae0387
parentb1318d47958dea5beeee1ae4d28db528080d3985
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