diff options
author | Dmitry Safonov <dima@arista.com> | 2023-10-23 20:22:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-27 10:35:45 +0100 |
commit | 67fa83f7c86a86913ab9cd5a13b4bebd8d2ebb43 (patch) | |
tree | a08a7cdd4c208883f96a724379ff871cffe9a76a /include/net/tcp_ao.h | |
parent | d6732b95b6fbbc6d5bb9d2f809e275763640c4a2 (diff) | |
download | lwn-67fa83f7c86a86913ab9cd5a13b4bebd8d2ebb43.tar.gz lwn-67fa83f7c86a86913ab9cd5a13b4bebd8d2ebb43.zip |
net/tcp: Add static_key for TCP-AO
Similarly to TCP-MD5, add a static key to TCP-AO that is patched out
when there are no keys on a machine and dynamically enabled with the
first setsockopt(TCP_AO) adds a key on any socket. The static key is as
well dynamically disabled later when the socket is destructed.
The lifetime of enabled static key here is the same as ao_info: it is
enabled on allocation, passed over from full socket to twsk and
destructed when ao_info is scheduled for destruction.
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_ao.h')
-rw-r--r-- | include/net/tcp_ao.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/tcp_ao.h b/include/net/tcp_ao.h index 061c358a3c8a..a38408072ea8 100644 --- a/include/net/tcp_ao.h +++ b/include/net/tcp_ao.h @@ -151,6 +151,8 @@ do { \ #ifdef CONFIG_TCP_AO /* TCP-AO structures and functions */ +#include <linux/jump_label.h> +extern struct static_key_false_deferred tcp_ao_needed; struct tcp4_ao_context { __be32 saddr; |