summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorNikolay Borisov <kernel@kyup.com>2016-02-03 09:46:56 +0200
committerDavid S. Miller <davem@davemloft.net>2016-02-07 14:36:11 -0500
commit1e579caa18b96f9eb18f4f5416658cd15f37c062 (patch)
tree7c48df6e8e727a5db5ff50c3e6296ff96915c934 /include/net
parentc402d9beffb6141ab2e4d2ad8be71128803a28ca (diff)
downloadlinux-1e579caa18b96f9eb18f4f5416658cd15f37c062.tar.gz
linux-1e579caa18b96f9eb18f4f5416658cd15f37c062.tar.bz2
linux-1e579caa18b96f9eb18f4f5416658cd15f37c062.zip
ipv4: Namespaceify tcp_fin_timeout sysctl knob
Signed-off-by: Nikolay Borisov <kernel@kyup.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netns/ipv4.h1
-rw-r--r--include/net/tcp.h3
2 files changed, 2 insertions, 2 deletions
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 080230321985..de5ff4385e84 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -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;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 71f840b89c76..3f160c2e6960 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -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))