We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db16377 commit af8a066Copy full SHA for af8a066
tools/testing/selftests/bpf/progs/test_tcp_custom_syncookie.c
@@ -486,17 +486,10 @@ static int tcp_validate_cookie(struct tcp_syncookie *ctx)
486
goto err;
487
488
mssind = (cookie & (3 << 6)) >> 6;
489
- if (ctx->ipv4) {
490
- if (mssind > ARRAY_SIZE(msstab4))
491
- goto err;
492
-
+ if (ctx->ipv4)
493
ctx->attrs.mss = msstab4[mssind];
494
- } else {
495
- if (mssind > ARRAY_SIZE(msstab6))
496
497
+ else
498
ctx->attrs.mss = msstab6[mssind];
499
- }
500
501
ctx->attrs.snd_wscale = cookie & BPF_SYNCOOKIE_WSCALE_MASK;
502
ctx->attrs.rcv_wscale = ctx->attrs.snd_wscale;
0 commit comments