summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2012-07-19 06:43:11 +0000
committerDavid S. Miller <davem@davemloft.net>2012-07-19 11:02:03 -0700
commit67da22d23fa6f3324e03bcd0580b914b2e4afbf3 (patch)
treee794826d1dd7e30cf0885cbe93f22bc050c62359 /include
parentaab4874355679c70f93993cf3b3fd74643b9ac33 (diff)
downloadlinux-stable-67da22d23fa6f3324e03bcd0580b914b2e4afbf3.tar.gz
linux-stable-67da22d23fa6f3324e03bcd0580b914b2e4afbf3.tar.bz2
linux-stable-67da22d23fa6f3324e03bcd0580b914b2e4afbf3.zip
net-tcp: Fast Open client - cookie-less mode
In trusted networks, e.g., intranet, data-center, the client does not need to use Fast Open cookie to mitigate DoS attacks. In cookie-less mode, sendmsg() with MSG_FASTOPEN flag will send SYN-data regardless of cookie availability. Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tcp.h1
-rw-r--r--include/net/tcp.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 1edf96afab44..9febfb685c33 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -387,6 +387,7 @@ struct tcp_sock {
u8 repair_queue;
u8 do_early_retrans:1,/* Enable RFC5827 early-retransmit */
early_retrans_delayed:1, /* Delayed ER timer installed */
+ syn_data:1, /* SYN includes data */
syn_fastopen:1; /* SYN includes Fast Open option */
/* RTT measurement */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index e07878d246aa..bc7c134ec054 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -214,6 +214,7 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
/* Bit Flags for sysctl_tcp_fastopen */
#define TFO_CLIENT_ENABLE 1
+#define TFO_CLIENT_NO_COOKIE 4 /* Data in SYN w/o cookie option */
extern struct inet_timewait_death_row tcp_death_row;