diff options
author | Yuchung Cheng <ycheng@google.com> | 2017-10-18 21:22:51 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-20 15:21:36 +0300 |
commit | 1fba70e5b6bed53496ba1f1f16127f5be01b5fb6 (patch) | |
tree | 22b060a68ca7b36f052b8f943c91c7ba78b8ddcf /include/net/tcp.h | |
parent | ce12f7ddff2df63b8f9abf33d6fe020e35de4059 (diff) | |
download | linux-1fba70e5b6bed53496ba1f1f16127f5be01b5fb6.tar.xz |
tcp: socket option to set TCP fast open key
New socket option TCP_FASTOPEN_KEY to allow different keys per
listener. The listener by default uses the global key until the
socket option is set. The key is a 16 bytes long binary data. This
option has no effect on regular non-listener TCP sockets.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Christoph Paasch <cpaasch@apple.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 3b3b9b968e2d..1efe8365cb28 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1555,9 +1555,10 @@ struct tcp_fastopen_request { int copied; /* queued in tcp_connect() */ }; void tcp_free_fastopen_req(struct tcp_sock *tp); - +void tcp_fastopen_destroy_cipher(struct sock *sk); void tcp_fastopen_ctx_destroy(struct net *net); -int tcp_fastopen_reset_cipher(struct net *net, void *key, unsigned int len); +int tcp_fastopen_reset_cipher(struct net *net, struct sock *sk, + void *key, unsigned int len); void tcp_fastopen_add_skb(struct sock *sk, struct sk_buff *skb); struct sock *tcp_try_fastopen(struct sock *sk, struct sk_buff *skb, struct request_sock *req, |