diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-08-29 02:48:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-29 02:48:54 -0400 |
commit | df19a6267705456f463871ae2aabc44299909d2a (patch) | |
tree | 59654abf9eb5dc58c9f8773dde5738b5bcb18312 /net/ipv4/tcp_timer.c | |
parent | 5e9b2dbfcbc9b180a0064d8a473a4652ee99c9ad (diff) |
tcp: keepalive cleanups
Introduce keepalive_probes(tp) helper, and use it, like
keepalive_time_when(tp) and keepalive_intvl_when(tp)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.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 | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index b144a26359bc..c520fb6e06d9 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c | |||
@@ -499,8 +499,7 @@ static void tcp_keepalive_timer (unsigned long data) | |||
499 | elapsed = tcp_time_stamp - tp->rcv_tstamp; | 499 | elapsed = tcp_time_stamp - tp->rcv_tstamp; |
500 | 500 | ||
501 | if (elapsed >= keepalive_time_when(tp)) { | 501 | if (elapsed >= keepalive_time_when(tp)) { |
502 | if ((!tp->keepalive_probes && icsk->icsk_probes_out >= sysctl_tcp_keepalive_probes) || | 502 | if (icsk->icsk_probes_out >= keepalive_probes(tp)) { |
503 | (tp->keepalive_probes && icsk->icsk_probes_out >= tp->keepalive_probes)) { | ||
504 | tcp_send_active_reset(sk, GFP_ATOMIC); | 503 | tcp_send_active_reset(sk, GFP_ATOMIC); |
505 | tcp_write_err(sk); | 504 | tcp_write_err(sk); |
506 | goto out; | 505 | goto out; |