diff options
Diffstat (limited to 'net/ipv4/syncookies.c')
-rw-r--r-- | net/ipv4/syncookies.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index cd2b97f1b6e1..a6e0e077ac33 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -37,12 +37,13 @@ __initcall(init_syncookies); | |||
37 | #define COOKIEBITS 24 /* Upper bits store count */ | 37 | #define COOKIEBITS 24 /* Upper bits store count */ |
38 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) | 38 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) |
39 | 39 | ||
40 | static DEFINE_PER_CPU(__u32, cookie_scratch)[16 + 5 + SHA_WORKSPACE_WORDS]; | 40 | static DEFINE_PER_CPU(__u32 [16 + 5 + SHA_WORKSPACE_WORDS], |
41 | ipv4_cookie_scratch); | ||
41 | 42 | ||
42 | static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, | 43 | static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport, |
43 | u32 count, int c) | 44 | u32 count, int c) |
44 | { | 45 | { |
45 | __u32 *tmp = __get_cpu_var(cookie_scratch); | 46 | __u32 *tmp = __get_cpu_var(ipv4_cookie_scratch); |
46 | 47 | ||
47 | memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c])); | 48 | memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c])); |
48 | tmp[0] = (__force u32)saddr; | 49 | tmp[0] = (__force u32)saddr; |