selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
Subsystems (5)
PATCH 1/1 selftest: 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.
--- tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c +3 -1
@@ -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)
Signature · 1 line
2.49.0
This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <[email protected]>:
Quoted 8 lines · On Wed, 14 May 2025 14:40:20 -0700 you wrote:
The custom syncookie test expects
TCPOPT_WINDOWto 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_WINDOWvalue in the range 1–14.[...]
Here is the summary with links:
- [v1,bpf-next] selftest: bpf: Relax TCPOPT_WINDOW validation in test_tcp_custom_syncookie.c.
https://git.kernel.org/bpf/bpf-next/c/4dd372de3fde
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
Jakub Kicinski
maintainerQuoted 3 lines · On Wed, 14 May 2025 22:40:31 +0000 [email protected] wrote:
Here is the summary with links:
- [v1,bpf-next] selftest: bpf: RelaxTCPOPT_WINDOWvalidation intest_tcp_custom_syncookie.c.https://git.kernel.org/bpf/bpf-next/c/4dd372de3fde
Per the link in the commit description we need this in net-next :( Did it land in the non-network BPF tree? Or on the network branch?
Jakub Kicinski
maintainerQuoted 8 lines · On Thu, 15 May 2025 10:36:42 -0700 Jakub Kicinski wrote:
Quoted 3 lines · On Wed, 14 May 2025 22:40:31 +0000 [email protected] wrote:
Here is the summary with links:
- [v1,bpf-next] selftest: bpf: RelaxTCPOPT_WINDOWvalidation intest_tcp_custom_syncookie.c.https://git.kernel.org/bpf/bpf-next/c/4dd372de3fdePer the link in the commit description we need this in net-next :( Did it land in the non-network BPF tree? Or on the network branch?
Martin pointed out off list that the CI flow merges in bpf-next so it won't matter, all good.