aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
authorDaniel Lee <Longinus00@gmail.com>2015-04-06 17:37:27 -0400
committerDavid S. Miller <davem@davemloft.net>2015-04-07 18:36:39 -0400
commit2646c831c00c5d22aa72b79d24069c1b412cda7c (patch)
treef6e61181b9dc10969a0501fc1e3a8af5be021dfe /include/net/tcp.h
parent7f9b838b71eb78a27de27a12ca5de8542fac3115 (diff)
tcp: RFC7413 option support for Fast Open client
Fast Open has been using an experimental option with a magic number (RFC6994). This patch makes the client by default use the RFC7413 option (34) to get and send Fast Open cookies. This patch makes the client solicit cookies from a given server first with the RFC7413 option. If that fails to elicit a cookie, then it tries the RFC6994 experimental option. If that also fails, it uses the RFC7413 option on all subsequent connect attempts. If the server returns a Fast Open cookie then the client caches the form of the option that successfully elicited a cookie, and uses that form on later connects when it presents that cookie. The idea is to gradually obsolete the use of experimental options as the servers and clients upgrade, while keeping the interoperability meanwhile. Signed-off-by: Daniel Lee <Longinus00@gmail.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 7292c3c575bc..9598871485ce 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1339,7 +1339,8 @@ void tcp_fastopen_cache_get(struct sock *sk, u16 *mss,
1339 struct tcp_fastopen_cookie *cookie, int *syn_loss, 1339 struct tcp_fastopen_cookie *cookie, int *syn_loss,
1340 unsigned long *last_syn_loss); 1340 unsigned long *last_syn_loss);
1341void tcp_fastopen_cache_set(struct sock *sk, u16 mss, 1341void tcp_fastopen_cache_set(struct sock *sk, u16 mss,
1342 struct tcp_fastopen_cookie *cookie, bool syn_lost); 1342 struct tcp_fastopen_cookie *cookie, bool syn_lost,
1343 u16 try_exp);
1343struct tcp_fastopen_request { 1344struct tcp_fastopen_request {
1344 /* Fast Open cookie. Size 0 means a cookie request */ 1345 /* Fast Open cookie. Size 0 means a cookie request */
1345 struct tcp_fastopen_cookie cookie; 1346 struct tcp_fastopen_cookie cookie;