]> www.infradead.org Git - users/dwmw2/linux.git/commit
net/tcp: Don't store TCP-AO maclen on reqsk
authorDmitry Safonov <dima@arista.com>
Mon, 4 Dec 2023 19:00:44 +0000 (19:00 +0000)
committerPaolo Abeni <pabeni@redhat.com>
Wed, 6 Dec 2023 11:36:56 +0000 (12:36 +0100)
commit9396c4ee93f9ac03cd0cea0bb345fbc657772943
treea6e57c26d2932ea1ac186211eb02f92c34751d89
parent12083d728213285c2d4347fa0ed3b556449703ce
net/tcp: Don't store TCP-AO maclen on reqsk

This extra check doesn't work for a handshake when SYN segment has
(current_key.maclen != rnext_key.maclen). It could be amended to
preserve rnext_key.maclen instead of current_key.maclen, but that
requires a lookup on listen socket.

Originally, this extra maclen check was introduced just because it was
cheap. Drop it and convert tcp_request_sock::maclen into boolean
tcp_request_sock::used_tcp_ao.

Fixes: 06b22ef29591 ("net/tcp: Wire TCP-AO to request sockets")
Signed-off-by: Dmitry Safonov <dima@arista.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
include/linux/tcp.h
net/ipv4/tcp_ao.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c