Skip to content

Commit cd0beac

Browse files
author
Martin KaFai Lau
committed
Merge branch 'bpf-next/net' into for-next
Signed-off-by: Martin KaFai Lau <[email protected]>
2 parents e7a594a + af8a066 commit cd0beac

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -486,17 +486,10 @@ static int tcp_validate_cookie(struct tcp_syncookie *ctx)
486486
goto err;
487487

488488
mssind = (cookie & (3 << 6)) >> 6;
489-
if (ctx->ipv4) {
490-
if (mssind > ARRAY_SIZE(msstab4))
491-
goto err;
492-
489+
if (ctx->ipv4)
493490
ctx->attrs.mss = msstab4[mssind];
494-
} else {
495-
if (mssind > ARRAY_SIZE(msstab6))
496-
goto err;
497-
491+
else
498492
ctx->attrs.mss = msstab6[mssind];
499-
}
500493

501494
ctx->attrs.snd_wscale = cookie & BPF_SYNCOOKIE_WSCALE_MASK;
502495
ctx->attrs.rcv_wscale = ctx->attrs.snd_wscale;

0 commit comments

Comments
 (0)