diff options
| author | Florian Westphal <[email protected]> | 2023-04-22 09:35:44 +0200 |
|---|---|---|
| committer | Alexei Starovoitov <[email protected]> | 2023-04-22 08:21:05 -0700 |
| commit | 6d26d985eeda89faedabbcf6607c37454b9691b0 (patch) | |
| tree | fc2893074a463aa7597ce33a7bdad54829ebebad /include | |
| parent | fbc1449d385d65be49a8d164dfd3772f2cb049ae (diff) | |
bpf: fix link failure with NETFILTER=y INET=n
Explicitly check if NETFILTER_BPF_LINK is enabled, else configs
that have NETFILTER=y but CONFIG_INET=n fail to link:
> kernel/bpf/syscall.o: undefined reference to `netfilter_prog_ops'
> kernel/bpf/verifier.o: undefined reference to `netfilter_verifier_ops'
Fixes: fd9c663b9ad6 ("bpf: minimal support for programs hooked into netfilter framework")
Reported-by: kernel test robot <[email protected]>
Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Florian Westphal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/bpf_types.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bpf_types.h b/include/linux/bpf_types.h index 39a999abb0ce..fc0d6f32c687 100644 --- a/include/linux/bpf_types.h +++ b/include/linux/bpf_types.h @@ -79,7 +79,7 @@ BPF_PROG_TYPE(BPF_PROG_TYPE_LSM, lsm, #endif BPF_PROG_TYPE(BPF_PROG_TYPE_SYSCALL, bpf_syscall, void *, void *) -#ifdef CONFIG_NETFILTER +#ifdef CONFIG_NETFILTER_BPF_LINK BPF_PROG_TYPE(BPF_PROG_TYPE_NETFILTER, netfilter, struct bpf_nf_ctx, struct bpf_nf_ctx) #endif |