aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r--net/ipv4/tcp_timer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index f753f9d2fee3..655dd8d7f064 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -640,7 +640,8 @@ static void tcp_keepalive_timer (unsigned long data)
640 goto death; 640 goto death;
641 } 641 }
642 642
643 if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE) 643 if (!sock_flag(sk, SOCK_KEEPOPEN) ||
644 ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_SYN_SENT)))
644 goto out; 645 goto out;
645 646
646 elapsed = keepalive_time_when(tp); 647 elapsed = keepalive_time_when(tp);