diff options
author | Yuchung Cheng <ycheng@google.com> | 2015-11-19 03:17:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-11-20 16:51:12 +0100 |
commit | dd52bc2b4ed16db66f9347aa263d8f1dc889b4b6 (patch) | |
tree | ffab58ab0e302ad9e32caa65eb718a1e34b9d08e /net/ipv4/tcp_timer.c | |
parent | tcp: disable Fast Open on timeouts after handshake (diff) | |
download | linux-dd52bc2b4ed16db66f9347aa263d8f1dc889b4b6.tar.xz linux-dd52bc2b4ed16db66f9347aa263d8f1dc889b4b6.zip |
tcp: fix Fast Open snmp over-counting bug
Fix incrementing TCPFastOpenActiveFailed snmp stats multiple times
when the handshake experiences multiple SYN timeouts.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index 448603a81966..193ba1fa8a9a 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -168,7 +168,7 @@ static int tcp_write_timeout(struct sock *sk) dst_negative_advice(sk); if (tp->syn_fastopen || tp->syn_data) tcp_fastopen_cache_set(sk, 0, NULL, true, 0); - if (tp->syn_data) + if (tp->syn_data && icsk->icsk_retransmits == 1) NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPFASTOPENACTIVEFAIL); } |