diff options
author | Dmitry Safonov <dima@arista.com> | 2023-10-23 21:22:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-27 11:35:45 +0200 |
commit | 06b22ef29591f625ef877ae00d82192938e29e60 (patch) | |
tree | 25d7b31da15d3d4a13efb265eb99aac8aa125917 /include/net/tcp.h | |
parent | net/tcp: Add TCP-AO sign to twsk (diff) | |
download | linux-06b22ef29591f625ef877ae00d82192938e29e60.tar.xz linux-06b22ef29591f625ef877ae00d82192938e29e60.zip |
net/tcp: Wire TCP-AO to request sockets
Now when the new request socket is created from the listening socket,
it's recorded what MKT was used by the peer. tcp_rsk_used_ao() is
a new helper for checking if TCP-AO option was used to create the
request socket.
tcp_ao_copy_all_matching() will copy all keys that match the peer on the
request socket, as well as preparing them for the usage (creating
traffic keys).
Co-developed-by: Francesco Ruggeri <fruggeri@arista.com>
Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>
Co-developed-by: Salam Noureddine <noureddine@arista.com>
Signed-off-by: Salam Noureddine <noureddine@arista.com>
Signed-off-by: Dmitry Safonov <dima@arista.com>
Acked-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 17b3ecd2760f..d0bea102b523 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -2216,6 +2216,12 @@ struct tcp_request_sock_ops { const struct sock *sk, const struct sk_buff *skb); #endif +#ifdef CONFIG_TCP_AO + struct tcp_ao_key *(*ao_lookup)(const struct sock *sk, + struct request_sock *req, + int sndid, int rcvid); + int (*ao_calc_key)(struct tcp_ao_key *mkt, u8 *key, struct request_sock *sk); +#endif #ifdef CONFIG_SYN_COOKIES __u32 (*cookie_init_seq)(const struct sk_buff *skb, __u16 *mss); |