Skip to content
Commit 24bdfdd2 authored by Maxim Mikityanskiy's avatar Maxim Mikityanskiy Committed by Andrii Nakryiko
Browse files

selftests/bpf: Fix xdp_synproxy build failure if CONFIG_NF_CONNTRACK=m/n

When CONFIG_NF_CONNTRACK=m, struct bpf_ct_opts and enum member
BPF_F_CURRENT_NETNS are not exposed. This commit allows building the
xdp_synproxy selftest in such cases. Note that nf_conntrack must be
loaded before running the test if it's compiled as a module.

This commit also allows this selftest to be successfully compiled when
CONFIG_NF_CONNTRACK is disabled.

One unused local variable of type struct bpf_ct_opts is also removed.

Fixes: fb5cd0ce

 ("selftests/bpf: Add selftests for raw syncookie helpers")
Reported-by: default avatarYauheni Kaliuta <ykaliuta@redhat.com>
Signed-off-by: default avatarMaxim Mikityanskiy <maximmi@nvidia.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220708130319.1016294-1-maximmi@nvidia.com
parent 06cd4e9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment