aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/ringbuf.c
diff options
context:
space:
mode:
authorMatthieu Baerts <[email protected]>2020-06-03 21:03:47 +0200
committerDaniel Borkmann <[email protected]>2020-06-04 22:52:10 +0200
commit49b23575943c04b6711107cfd08ad2b3ae4e81f5 (patch)
treee768761ed5727d7b628cab70fde6c22aba249328 /tools/testing/selftests/bpf/prog_tests/ringbuf.c
parentcb8e59cc87201af93dfbb6c3dccc8fcad72a09c2 (diff)
bpf: Fix unused-var without NETDEVICES
A recent commit added new variables only used if CONFIG_NETDEVICES is set. A simple fix would be to only declare these variables if the same condition is valid but Alexei suggested an even simpler solution: since CONFIG_NETDEVICES doesn't change anything in .h I think the best is to remove #ifdef CONFIG_NETDEVICES from net/core/filter.c and rely on sock_bindtoindex() returning ENOPROTOOPT in the extreme case of oddly configured kernels. Fixes: 70c58997c1e8 ("bpf: Allow SO_BINDTODEVICE opt in bpf_setsockopt") Suggested-by: Alexei Starovoitov <[email protected]> Signed-off-by: Matthieu Baerts <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/ringbuf.c')
0 files changed, 0 insertions, 0 deletions