Commit 168a8f5
tcp: TCP Fast Open Server - main code path
This patch adds the main processing path to complete the TFO server
patches.
A TFO request (i.e., SYN+data packet with a TFO cookie option) first
gets processed in tcp_v4_conn_request(). If it passes the various TFO
checks by tcp_fastopen_check(), a child socket will be created right
away to be accepted by applications, rather than waiting for the 3WHS
to finish.
In additon to the use of TFO cookie, a simple max_qlen based scheme
is put in place to fend off spoofed TFO attack.
When a valid ACK comes back to tcp_rcv_state_process(), it will cause
the state of the child socket to switch from either TCP_SYN_RECV to
TCP_ESTABLISHED, or TCP_FIN_WAIT1 to TCP_FIN_WAIT2. At this time
retransmission will resume for any unack'ed (data, FIN,...) segments.
Signed-off-by: H.K. Jerry Chu <[email protected]>
Cc: Yuchung Cheng <[email protected]>
Cc: Neal Cardwell <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Tom Herbert <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 8336886 commit 168a8f5
2 files changed
+309
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3127 | 3127 | | |
3128 | 3128 | | |
3129 | 3129 | | |
| 3130 | + | |
| 3131 | + | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
| 3135 | + | |
3130 | 3136 | | |
3131 | 3137 | | |
3132 | 3138 | | |
| |||
5895 | 5901 | | |
5896 | 5902 | | |
5897 | 5903 | | |
5898 | | - | |
| 5904 | + | |
| 5905 | + | |
| 5906 | + | |
5899 | 5907 | | |
5900 | 5908 | | |
5901 | 5909 | | |
| |||
5935 | 5943 | | |
5936 | 5944 | | |
5937 | 5945 | | |
| 5946 | + | |
5938 | 5947 | | |
5939 | 5948 | | |
5940 | 5949 | | |
| |||
5990 | 5999 | | |
5991 | 6000 | | |
5992 | 6001 | | |
5993 | | - | |
| 6002 | + | |
| 6003 | + | |
| 6004 | + | |
| 6005 | + | |
| 6006 | + | |
| 6007 | + | |
| 6008 | + | |
| 6009 | + | |
5994 | 6010 | | |
5995 | 6011 | | |
5996 | 6012 | | |
| |||
6000 | 6016 | | |
6001 | 6017 | | |
6002 | 6018 | | |
6003 | | - | |
| 6019 | + | |
| 6020 | + | |
| 6021 | + | |
| 6022 | + | |
| 6023 | + | |
| 6024 | + | |
| 6025 | + | |
| 6026 | + | |
| 6027 | + | |
| 6028 | + | |
| 6029 | + | |
| 6030 | + | |
| 6031 | + | |
| 6032 | + | |
| 6033 | + | |
| 6034 | + | |
6004 | 6035 | | |
6005 | 6036 | | |
6006 | 6037 | | |
| |||
6022 | 6053 | | |
6023 | 6054 | | |
6024 | 6055 | | |
6025 | | - | |
6026 | | - | |
6027 | | - | |
6028 | | - | |
6029 | | - | |
6030 | | - | |
6031 | | - | |
6032 | | - | |
| 6056 | + | |
| 6057 | + | |
| 6058 | + | |
| 6059 | + | |
| 6060 | + | |
| 6061 | + | |
| 6062 | + | |
| 6063 | + | |
| 6064 | + | |
| 6065 | + | |
| 6066 | + | |
| 6067 | + | |
| 6068 | + | |
| 6069 | + | |
6033 | 6070 | | |
6034 | 6071 | | |
6035 | 6072 | | |
6036 | 6073 | | |
6037 | 6074 | | |
6038 | 6075 | | |
6039 | | - | |
6040 | 6076 | | |
6041 | | - | |
6042 | 6077 | | |
6043 | 6078 | | |
6044 | 6079 | | |
6045 | 6080 | | |
6046 | 6081 | | |
6047 | 6082 | | |
6048 | 6083 | | |
| 6084 | + | |
| 6085 | + | |
| 6086 | + | |
| 6087 | + | |
| 6088 | + | |
| 6089 | + | |
| 6090 | + | |
| 6091 | + | |
| 6092 | + | |
| 6093 | + | |
6049 | 6094 | | |
6050 | 6095 | | |
6051 | 6096 | | |
| |||
0 commit comments