]> www.infradead.org Git - users/dwmw2/linux.git/commit
tcp: Factorise cookie-independent fields initialisation in cookie_v[46]_check().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Wed, 29 Nov 2023 02:29:23 +0000 (18:29 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 30 Nov 2023 04:16:34 +0000 (20:16 -0800)
commitde5626b95e13a054aa80f890f2a774d2fc18d855
treebb01ba32476e0eba24a24207670a05997f0236e4
parent7b0f570f879adecf12329ecd60485e7e6b4783c1
tcp: Factorise cookie-independent fields initialisation in cookie_v[46]_check().

We will support arbitrary SYN Cookie with BPF, and then some reqsk fields
are initialised in kfunc, and others are done in cookie_v[46]_check().

This patch factorises the common part as cookie_tcp_reqsk_init() and
calls it in cookie_tcp_reqsk_alloc() to minimise the discrepancy between
cookie_v[46]_check().

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-8-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/syncookies.c
net/ipv6/syncookies.c