diff options
author | Neal Cardwell <ncardwell@google.com> | 2016-08-30 11:55:23 -0400 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2016-11-20 01:17:21 +0000 |
commit | 9e2c5a549c4bc1aeea52587fd47be38de0cdf969 (patch) | |
tree | 6663f3a4348cabe59cb17450f238db6b36a80a79 /net | |
parent | 37129ea3ee0718f26ec3c6a8b10c1372cc4aec17 (diff) |
tcp: fastopen: fix rcv_wup initialization for TFO server on SYN/data
commit 28b346cbc0715ae45b2814d857f1d8a7e6817ed8 upstream.
Yuchung noticed that on the first TFO server data packet sent after
the (TFO) handshake, the server echoed the TCP timestamp value in the
SYN/data instead of the timestamp value in the final ACK of the
handshake. This problem did not happen on regular opens.
The tcp_replace_ts_recent() logic that decides whether to remember an
incoming TS value needs tp->rcv_wup to hold the latest receive
sequence number that we have ACKed (latest tp->rcv_nxt we have
ACKed). This commit fixes this issue by ensuring that a TFO server
properly updates tp->rcv_wup to match tp->rcv_nxt at the time it sends
a SYN/ACK for the SYN/data.
Reported-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com>
Fixes: 168a8f58059a ("tcp: TCP Fast Open Server - main code path")
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_fastopen.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c index 6088c58bc54c..2b986576e5ad 100644 --- a/net/ipv4/tcp_fastopen.c +++ b/net/ipv4/tcp_fastopen.c @@ -213,6 +213,7 @@ static bool tcp_fastopen_create_child(struct sock *sk, } } tcp_rsk(req)->rcv_nxt = tp->rcv_nxt = end_seq; + tp->rcv_wup = tp->rcv_nxt; sk->sk_data_ready(sk); bh_unlock_sock(child); sock_put(child); |