diff options
| author | Yuchung Cheng <[email protected]> | 2016-09-21 23:16:15 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-09-22 07:33:01 +0000 |
| commit | 7e32b44361abc77fbc01f2b97b045c405b2583e5 (patch) | |
| tree | db26faa9681668af9678e478ec9aaed6a1b58c01 /net/ipv4/tcp_output.c | |
| parent | tcp: fix under-accounting retransmit SNMP counters (diff) | |
| download | kernel-7e32b44361abc77fbc01f2b97b045c405b2583e5.tar.gz kernel-7e32b44361abc77fbc01f2b97b045c405b2583e5.zip | |
tcp: properly account Fast Open SYN-ACK retrans
Since the TFO socket is accepted right off SYN-data, the socket
owner can call getsockopt(TCP_INFO) to collect ongoing SYN-ACK
retransmission or timeout stats (i.e., tcpi_total_retrans,
tcpi_retransmits). Currently those stats are only updated
upon handshake completes. This patch fixes it.
Signed-off-by: Yuchung Cheng <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: Neal Cardwell <[email protected]>
Signed-off-by: Soheil Hassas Yeganeh <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
| -rw-r--r-- | net/ipv4/tcp_output.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index e15ec82a6319..5288cec4a2b2 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3568,6 +3568,8 @@ int tcp_rtx_synack(const struct sock *sk, struct request_sock *req) if (!res) { __TCP_INC_STATS(sock_net(sk), TCP_MIB_RETRANSSEGS); __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPSYNRETRANS); + if (unlikely(tcp_passive_fastopen(sk))) + tcp_sk(sk)->total_retrans++; } return res; } |
