Skip to content

Commit 4dd372d

Browse files
q2venMartin KaFai Lau
authored andcommitted
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]
1 parent d0445d7 commit 4dd372d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ static int tcp_validate_sysctl(struct tcp_syncookie *ctx)
294294
(ctx->ipv6 && ctx->attrs.mss != MSS_LOCAL_IPV6))
295295
goto err;
296296

297-
if (!ctx->attrs.wscale_ok || ctx->attrs.snd_wscale != 7)
297+
if (!ctx->attrs.wscale_ok ||
298+
!ctx->attrs.snd_wscale ||
299+
ctx->attrs.snd_wscale >= BPF_SYNCOOKIE_WSCALE_MASK)
298300
goto err;
299301

300302
if (!ctx->attrs.tstamp_ok)

0 commit comments

Comments
 (0)