diff options
author | Dmitry Safonov <dima@arista.com> | 2023-10-23 21:21:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-27 11:35:44 +0200 |
commit | 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f (patch) | |
tree | bc6301428bb2bb3954835a6a6c1e97d034f6acda /net/ipv4/tcp_output.c | |
parent | net/tcp: Prevent TCP-MD5 with TCP-AO being set (diff) | |
download | linux-7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f.tar.xz linux-7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f.zip |
net/tcp: Calculate TCP-AO traffic keys
Add traffic key calculation the way it's described in RFC5926.
Wire it up to tcp_finish_connect() and cache the new keys straight away
on already established TCP connections.
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 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 1b90107f7038..9fbf1b2e2025 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3749,6 +3749,8 @@ static void tcp_connect_init(struct sock *sk) if (READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_timestamps)) tp->tcp_header_len += TCPOLEN_TSTAMP_ALIGNED; + tcp_ao_connect_init(sk); + /* If user gave his TCP_MAXSEG, record it to clamp */ if (tp->rx_opt.user_mss) tp->rx_opt.mss_clamp = tp->rx_opt.user_mss; |