bpf: fix availability probing for seg6 helpers
authorMathieu Xhonneux <m.xhonneux@gmail.com>
Tue, 10 Jul 2018 16:54:02 +0000 (16:54 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 11 Jul 2018 20:29:18 +0000 (22:29 +0200)
commit61d769807f273fda962866f3d4c677cda9974d3c
tree71f5166effba9c75f9adb54939cf48d4633fbdff
parent59ee4129a279070d8e2f9dc1660330f6593c7808
bpf: fix availability probing for seg6 helpers

bpf_lwt_seg6_* helpers require CONFIG_IPV6_SEG6_BPF, and currently
return -EOPNOTSUPP to indicate unavailability. This patch forces the
BPF verifier to reject programs using these helpers when
!CONFIG_IPV6_SEG6_BPF, allowing users to more easily probe if they are
available or not.

Signed-off-by: Mathieu Xhonneux <m.xhonneux@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/core/filter.c