diff options
author | Florian Westphal <fw@strlen.de> | 2014-08-26 06:55:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-27 19:30:49 -0400 |
commit | 253ff51635ad6690276ef065d59523c4bd1cd584 (patch) | |
tree | 7024bed49e3532b3a382c66150fd2c3681559c87 | |
parent | 1fc3de94076cd0c1e53e5ba8061763b33c7b27c2 (diff) |
tcp: syncookies: mark cookie_secret read_mostly
only written once.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/syncookies.c | 2 | ||||
-rw-r--r-- | net/ipv6/syncookies.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index c0c75688896e..0431a8f3c8f4 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | extern int sysctl_tcp_syncookies; | 26 | extern int sysctl_tcp_syncookies; |
27 | 27 | ||
28 | static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS]; | 28 | static u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly; |
29 | 29 | ||
30 | #define COOKIEBITS 24 /* Upper bits store count */ | 30 | #define COOKIEBITS 24 /* Upper bits store count */ |
31 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) | 31 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) |
diff --git a/net/ipv6/syncookies.c b/net/ipv6/syncookies.c index 83cea1d39466..c643dc907ce7 100644 --- a/net/ipv6/syncookies.c +++ b/net/ipv6/syncookies.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #define COOKIEBITS 24 /* Upper bits store count */ | 24 | #define COOKIEBITS 24 /* Upper bits store count */ |
25 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) | 25 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) |
26 | 26 | ||
27 | static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS]; | 27 | static u32 syncookie6_secret[2][16-4+SHA_DIGEST_WORDS] __read_mostly; |
28 | 28 | ||
29 | /* RFC 2460, Section 8.3: | 29 | /* RFC 2460, Section 8.3: |
30 | * [ipv6 tcp] MSS must be computed as the maximum packet size minus 60 [..] | 30 | * [ipv6 tcp] MSS must be computed as the maximum packet size minus 60 [..] |