diff options
author | 2023-11-28 18:29:21 -0800 | |
---|---|---|
committer | 2023-11-29 20:16:23 -0800 | |
commit | efce3d1fdff53ef45b11ff407f16bc2f6f292b93 (patch) | |
tree | 18d1e6974e8f0886b23fb7ca4798f28b03bcc097 /include/net/tcp_ao.h | |
parent | tcp: Don't pass cookie to __cookie_v[46]_check(). (diff) | |
download | wireguard-linux-efce3d1fdff53ef45b11ff407f16bc2f6f292b93.tar.xz wireguard-linux-efce3d1fdff53ef45b11ff407f16bc2f6f292b93.zip |
tcp: Don't initialise tp->tsoffset in tcp_get_cookie_sock().
When we create a full socket from SYN Cookie, we initialise
tcp_sk(sk)->tsoffset redundantly in tcp_get_cookie_sock() as
the field is inherited from tcp_rsk(req)->ts_off.
cookie_v[46]_check
|- treq->ts_off = 0
`- tcp_get_cookie_sock
|- tcp_v[46]_syn_recv_sock
| `- tcp_create_openreq_child
| `- newtp->tsoffset = treq->ts_off
`- tcp_sk(child)->tsoffset = tsoff
Let's initialise tcp_rsk(req)->ts_off with the correct offset
and remove the second initialisation of tcp_sk(sk)->tsoffset.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20231129022924.96156-6-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/tcp_ao.h')
0 files changed, 0 insertions, 0 deletions