diff options
author | Nikolay Borisov <kernel@kyup.com> | 2016-02-03 09:46:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-02-07 14:35:10 -0500 |
commit | 12ed8244ed8b31b023ea6d2851fd8b15f2999e9b (patch) | |
tree | 5634ea70baf72e6d4008d3daa40d0f4dbbee1705 /net/ipv4/syncookies.c | |
parent | 7c083ecb3ba4583a625d5ff9655d1a819e374493 (diff) | |
download | lwn-12ed8244ed8b31b023ea6d2851fd8b15f2999e9b.tar.gz lwn-12ed8244ed8b31b023ea6d2851fd8b15f2999e9b.zip |
ipv4: Namespaceify tcp syncookies sysctl knob
Signed-off-by: Nikolay Borisov <kernel@kyup.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 643a86c49020..ba0dcffada3b 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c @@ -19,8 +19,6 @@ #include <net/tcp.h> #include <net/route.h> -extern int sysctl_tcp_syncookies; - static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly; #define COOKIEBITS 24 /* Upper bits store count */ @@ -307,7 +305,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb) __u8 rcv_wscale; struct flowi4 fl4; - if (!sysctl_tcp_syncookies || !th->ack || th->rst) + if (!sock_net(sk)->ipv4.sysctl_tcp_syncookies || !th->ack || th->rst) goto out; if (tcp_synq_no_recent_overflow(sk)) |