]> git.baikalelectronics.ru Git - kernel.git/commit
kernel/bpf/verifier: Fix build when NET is not enabled
authorRandy Dunlap <rdunlap@infradead.org>
Wed, 7 Oct 2020 02:16:13 +0000 (19:16 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 7 Oct 2020 17:53:43 +0000 (10:53 -0700)
commit37c326d4644624fc2fa7deed6a839b0c2652ff54
tree8897a44efa66629235bb8e3041e642bc70cbd38f
parentda1ec9baffa419eaa33a3079cf0f93716dde3b02
kernel/bpf/verifier: Fix build when NET is not enabled

Fix build errors in kernel/bpf/verifier.c when CONFIG_NET is
not enabled.

../kernel/bpf/verifier.c:3995:13: error: ‘btf_sock_ids’ undeclared here (not in a function); did you mean ‘bpf_sock_ops’?
  .btf_id = &btf_sock_ids[BTF_SOCK_TYPE_SOCK_COMMON],

../kernel/bpf/verifier.c:3995:26: error: ‘BTF_SOCK_TYPE_SOCK_COMMON’ undeclared here (not in a function); did you mean ‘PTR_TO_SOCK_COMMON’?
  .btf_id = &btf_sock_ids[BTF_SOCK_TYPE_SOCK_COMMON],

Fixes: 8857768ad56b ("bpf: Enable bpf_skc_to_* sock casting helper to networking prog type")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20201007021613.13646-1-rdunlap@infradead.org
kernel/bpf/verifier.c