diff options
| author | Kuniyuki Iwashima <[email protected]> | 2025-05-14 21:40:20 +0000 |
|---|---|---|
| committer | Martin KaFai Lau <[email protected]> | 2025-05-14 22:13:24 +0000 |
| commit | 4dd372de3fde1afab3adf231e8b2962c40200387 (patch) | |
| tree | b6ae7f87d4a6d6f18cf753ead54e021992640bbe /tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c | |
| parent | libbpf: Check bpf_map_skeleton link for NULL (diff) | |
| download | kernel-4dd372de3fde1afab3adf231e8b2962c40200387.tar.gz kernel-4dd372de3fde1afab3adf231e8b2962c40200387.zip | |
selftests/bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
The custom syncookie test expects TCPOPT_WINDOW to be 7 based on the
kernel’s behaviour at the time, but the upcoming series [0] will bump
it to 10.
Let's relax the test to allow any valid TCPOPT_WINDOW value in the
range 1–14.
Signed-off-by: Kuniyuki Iwashima <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Link: https://lore.kernel.org/netdev/[email protected]/ #[0]
Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c')
| -rw-r--r-- | tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c b/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c index eb5cca1fce16..7d5293de1952 100644 --- a/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c +++ b/tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c @@ -294,7 +294,9 @@ static int tcp_validate_sysctl(struct tcp_syncookie *ctx) (ctx->ipv6 && ctx->attrs.mss != MSS_LOCAL_IPV6)) goto err; - if (!ctx->attrs.wscale_ok || ctx->attrs.snd_wscale != 7) + if (!ctx->attrs.wscale_ok || + !ctx->attrs.snd_wscale || + ctx->attrs.snd_wscale >= BPF_SYNCOOKIE_WSCALE_MASK) goto err; if (!ctx->attrs.tstamp_ok) |
