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
@@ -1007,6 +1007,11 @@ static inline int keepalive_time_when(const struct tcp_sock *tp)
|
||||
return tp->keepalive_time ? : sysctl_tcp_keepalive_time;
|
||||
}
|
||||
|
||||
static inline int keepalive_probes(const struct tcp_sock *tp)
|
||||
{
|
||||
return tp->keepalive_probes ? : sysctl_tcp_keepalive_probes;
|
||||
}
|
||||
|
||||
static inline int tcp_fin_time(const struct sock *sk)
|
||||
{
|
||||
int fin_timeout = tcp_sk(sk)->linger2 ? : sysctl_tcp_fin_timeout;
|
||||
|
Reference in New Issue
Block a user