mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
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:
parent
5e9b2dbfcb
commit
df19a62677
3 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue