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>
This commit is contained in:
committed by
David S. Miller
parent
5e9b2dbfcb
commit
df19a62677
@ -499,8 +499,7 @@ static void tcp_keepalive_timer (unsigned long data)
|
||||
elapsed = tcp_time_stamp - tp->rcv_tstamp;
|
||||
|
||||
if (elapsed >= keepalive_time_when(tp)) {
|
||||
if ((!tp->keepalive_probes && icsk->icsk_probes_out >= sysctl_tcp_keepalive_probes) ||
|
||||
(tp->keepalive_probes && icsk->icsk_probes_out >= tp->keepalive_probes)) {
|
||||
if (icsk->icsk_probes_out >= keepalive_probes(tp)) {
|
||||
tcp_send_active_reset(sk, GFP_ATOMIC);
|
||||
tcp_write_err(sk);
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user