diff options
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 30d81f533ada..fe9da4fb96bf 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -84,7 +84,6 @@ | |||
84 | #include <crypto/hash.h> | 84 | #include <crypto/hash.h> |
85 | #include <linux/scatterlist.h> | 85 | #include <linux/scatterlist.h> |
86 | 86 | ||
87 | int sysctl_tcp_tw_reuse __read_mostly; | ||
88 | int sysctl_tcp_low_latency __read_mostly; | 87 | int sysctl_tcp_low_latency __read_mostly; |
89 | 88 | ||
90 | #ifdef CONFIG_TCP_MD5SIG | 89 | #ifdef CONFIG_TCP_MD5SIG |
@@ -120,7 +119,7 @@ int tcp_twsk_unique(struct sock *sk, struct sock *sktw, void *twp) | |||
120 | and use initial timestamp retrieved from peer table. | 119 | and use initial timestamp retrieved from peer table. |
121 | */ | 120 | */ |
122 | if (tcptw->tw_ts_recent_stamp && | 121 | if (tcptw->tw_ts_recent_stamp && |
123 | (!twp || (sysctl_tcp_tw_reuse && | 122 | (!twp || (sock_net(sk)->ipv4.sysctl_tcp_tw_reuse && |
124 | get_seconds() - tcptw->tw_ts_recent_stamp > 1))) { | 123 | get_seconds() - tcptw->tw_ts_recent_stamp > 1))) { |
125 | tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; | 124 | tp->write_seq = tcptw->tw_snd_nxt + 65535 + 2; |
126 | if (tp->write_seq == 0) | 125 | if (tp->write_seq == 0) |
@@ -2456,6 +2455,7 @@ static int __net_init tcp_sk_init(struct net *net) | |||
2456 | net->ipv4.sysctl_tcp_orphan_retries = 0; | 2455 | net->ipv4.sysctl_tcp_orphan_retries = 0; |
2457 | net->ipv4.sysctl_tcp_fin_timeout = TCP_FIN_TIMEOUT; | 2456 | net->ipv4.sysctl_tcp_fin_timeout = TCP_FIN_TIMEOUT; |
2458 | net->ipv4.sysctl_tcp_notsent_lowat = UINT_MAX; | 2457 | net->ipv4.sysctl_tcp_notsent_lowat = UINT_MAX; |
2458 | net->ipv4.sysctl_tcp_tw_reuse = 0; | ||
2459 | 2459 | ||
2460 | return 0; | 2460 | return 0; |
2461 | fail: | 2461 | fail: |