ipv4: Namespaceify tcp_fin_timeout sysctl knob
Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
c402d9beff
commit
1e579caa18
@@ -105,6 +105,7 @@ struct netns_ipv4 {
|
||||
int sysctl_tcp_retries1;
|
||||
int sysctl_tcp_retries2;
|
||||
int sysctl_tcp_orphan_retries;
|
||||
int sysctl_tcp_fin_timeout;
|
||||
|
||||
struct ping_group_range ping_group_range;
|
||||
|
||||
|
@@ -239,7 +239,6 @@ extern struct inet_timewait_death_row tcp_death_row;
|
||||
extern int sysctl_tcp_timestamps;
|
||||
extern int sysctl_tcp_window_scaling;
|
||||
extern int sysctl_tcp_sack;
|
||||
extern int sysctl_tcp_fin_timeout;
|
||||
extern int sysctl_tcp_fastopen;
|
||||
extern int sysctl_tcp_retrans_collapse;
|
||||
extern int sysctl_tcp_stdurg;
|
||||
@@ -1249,7 +1248,7 @@ static inline u32 keepalive_time_elapsed(const struct tcp_sock *tp)
|
||||
|
||||
static inline int tcp_fin_time(const struct sock *sk)
|
||||
{
|
||||
int fin_timeout = tcp_sk(sk)->linger2 ? : sysctl_tcp_fin_timeout;
|
||||
int fin_timeout = tcp_sk(sk)->linger2 ? : sock_net(sk)->ipv4.sysctl_tcp_fin_timeout;
|
||||
const int rto = inet_csk(sk)->icsk_rto;
|
||||
|
||||
if (fin_timeout < (rto << 2) - (rto >> 1))
|
||||
|
Reference in New Issue
Block a user