diff options
| author | Kuniyuki Iwashima <[email protected]> | 2023-11-29 02:29:21 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-11-30 04:16:23 +0000 |
| commit | efce3d1fdff53ef45b11ff407f16bc2f6f292b93 (patch) | |
| tree | 18d1e6974e8f0886b23fb7ca4798f28b03bcc097 /net/unix/unix_bpf.c | |
| parent | tcp: Don't pass cookie to __cookie_v[46]_check(). (diff) | |
| download | kernel-efce3d1fdff53ef45b11ff407f16bc2f6f292b93.tar.gz kernel-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 <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/unix_bpf.c')
0 files changed, 0 insertions, 0 deletions
