aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r--net/ipv4/tcp_input.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 432c36649db..1db66398358 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5646,6 +5646,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
5646 tcp_rearm_rto(sk); 5646 tcp_rearm_rto(sk);
5647 return true; 5647 return true;
5648 } 5648 }
5649 tp->syn_data_acked = tp->syn_data;
5649 return false; 5650 return false;
5650} 5651}
5651 5652
@@ -5963,7 +5964,7 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
5963 5964
5964 req = tp->fastopen_rsk; 5965 req = tp->fastopen_rsk;
5965 if (req != NULL) { 5966 if (req != NULL) {
5966 BUG_ON(sk->sk_state != TCP_SYN_RECV && 5967 WARN_ON_ONCE(sk->sk_state != TCP_SYN_RECV &&
5967 sk->sk_state != TCP_FIN_WAIT1); 5968 sk->sk_state != TCP_FIN_WAIT1);
5968 5969
5969 if (tcp_check_req(sk, skb, req, NULL, true) == NULL) 5970 if (tcp_check_req(sk, skb, req, NULL, true) == NULL)
@@ -6052,7 +6053,15 @@ int tcp_rcv_state_process(struct sock *sk, struct sk_buff *skb,
6052 * ACK we have received, this would have acknowledged 6053 * ACK we have received, this would have acknowledged
6053 * our SYNACK so stop the SYNACK timer. 6054 * our SYNACK so stop the SYNACK timer.
6054 */ 6055 */
6055 if (acceptable && req != NULL) { 6056 if (req != NULL) {
6057 /* Return RST if ack_seq is invalid.
6058 * Note that RFC793 only says to generate a
6059 * DUPACK for it but for TCP Fast Open it seems
6060 * better to treat this case like TCP_SYN_RECV
6061 * above.
6062 */
6063 if (!acceptable)
6064 return 1;
6056 /* We no longer need the request sock. */ 6065 /* We no longer need the request sock. */
6057 reqsk_fastopen_remove(sk, req, false); 6066 reqsk_fastopen_remove(sk, req, false);
6058 tcp_rearm_rto(sk); 6067 tcp_rearm_rto(sk);