diff options
| author | Kuniyuki Iwashima <[email protected]> | 2023-11-29 02:29:24 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2023-11-30 04:16:38 +0000 |
| commit | 8e7bab6b9652cd07a05ee0380b623c0e00e3eb00 (patch) | |
| tree | 51ab8ee1bc85d5af40c50c6d6cbd84b5d0a9ce47 /net/unix/unix_bpf.c | |
| parent | tcp: Factorise cookie-independent fields initialisation in cookie_v[46]_check(). (diff) | |
| download | kernel-8e7bab6b9652cd07a05ee0380b623c0e00e3eb00.tar.gz kernel-8e7bab6b9652cd07a05ee0380b623c0e00e3eb00.zip | |
tcp: Factorise cookie-dependent fields initialisation in cookie_v[46]_check()
We will support arbitrary SYN Cookie with BPF, and then kfunc at
TC will preallocate reqsk and initialise some fields that should
not be overwritten later by cookie_v[46]_check().
To simplify the flow in cookie_v[46]_check(), we move such fields'
initialisation to cookie_tcp_reqsk_alloc() and factorise non-BPF
SYN Cookie handling into cookie_tcp_check(), where we validate the
cookie and allocate reqsk, as done by kfunc later.
Note that we set ireq->ecn_ok in two steps, the latter of which will
be shared by the BPF case. As cookie_ecn_ok() is one-liner, now
it's inlined.
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
