summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_timer.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2017-08-21 19:32:58 +0100
committerMark Brown <broonie@kernel.org>2017-08-21 19:32:58 +0100
commit6329b1bb4e691b24e51ea940b3c2cffd402bd5f8 (patch)
tree1e01171ec074d83637f3249a64c179b2147e8e4b /net/ipv4/tcp_timer.c
parent702992387b759828f58e52f660acb284b3069944 (diff)
parent14ccee78fc82f5512908f4424f541549a5705b89 (diff)
Merge tag 'v4.13-rc6' into asoc-msm8916
Linux 4.13-rc6
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 c0feeeef962a..e906014890b6 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -652,7 +652,8 @@ static void tcp_keepalive_timer (unsigned long data)
goto death;
}
- if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE)
+ if (!sock_flag(sk, SOCK_KEEPOPEN) ||
+ ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_SYN_SENT)))
goto out;
elapsed = keepalive_time_when(tp);