]> Git Repo - linux.git/commitdiff
tcp: fix Fast Open snmp over-counting bug
authorYuchung Cheng <[email protected]>
Thu, 19 Nov 2015 02:17:31 +0000 (18:17 -0800)
committerDavid S. Miller <[email protected]>
Fri, 20 Nov 2015 15:51:12 +0000 (10:51 -0500)
Fix incrementing TCPFastOpenActiveFailed snmp stats multiple times
when the handshake experiences multiple SYN timeouts.

Signed-off-by: Yuchung Cheng <[email protected]>
Signed-off-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/ipv4/tcp_timer.c

index 448603a819668bb5fb0abb02f86207987fd8ce81..193ba1fa8a9abbc190823a86398722d5c5a605fe 100644 (file)
@@ -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);
                }
This page took 0.060482 seconds and 4 git commands to generate.