diff options
| author | Andrii Nakryiko <[email protected]> | 2021-06-17 04:14:46 +0000 |
|---|---|---|
| committer | Daniel Borkmann <[email protected]> | 2021-06-17 11:05:10 +0000 |
| commit | f20792d425d2efd2680f2855c1e3fec01c2e569e (patch) | |
| tree | d313e444e47989bbd52b5d0b7b125df069cb111c | |
| parent | bpf: Fix up register-based shifts in interpreter to silence KUBSAN (diff) | |
| download | kernel-f20792d425d2efd2680f2855c1e3fec01c2e569e.tar.gz kernel-f20792d425d2efd2680f2855c1e3fec01c2e569e.zip | |
selftests/bpf: Fix selftests build with old system-wide headers
migrate_reuseport.c selftest relies on having TCP_FASTOPEN_CONNECT defined in
system-wide netinet/tcp.h. Selftests can use up-to-date uapi/linux/tcp.h, but
that one doesn't have SOL_TCP. So instead of switching everything to uapi
header, add #define for TCP_FASTOPEN_CONNECT to fix the build.
Fixes: c9d0bdef89a6 ("bpf: Test BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Kuniyuki Iwashima <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
| -rw-r--r-- | tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c b/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c index 0fa3f750567d..59adb4715394 100644 --- a/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c +++ b/tools/testing/selftests/bpf/prog_tests/migrate_reuseport.c @@ -30,6 +30,10 @@ #include "test_migrate_reuseport.skel.h" #include "network_helpers.h" +#ifndef TCP_FASTOPEN_CONNECT +#define TCP_FASTOPEN_CONNECT 30 +#endif + #define IFINDEX_LO 1 #define NR_SERVERS 5 |
