IPV4: fib_trie use vmalloc for large tnodes
[deliverable/linux.git] / net / ipv4 / syncookies.c
index 177da14f6b1454d64d9ec70d30b15415d392fc5b..abc752d45cf72e7ffda32dd53bcbb188b620e90a 100644 (file)
@@ -10,8 +10,6 @@
  *      2 of the License, or (at your option) any later version.
  *
  *  $Id: syncookies.c,v 1.18 2002/02/01 22:01:04 davem Exp $
- *
- *  Missing: IPv6 support.
  */
 
 #include <linux/tcp.h>
 
 extern int sysctl_tcp_syncookies;
 
-static __u32 syncookie_secret[2][16-3+SHA_DIGEST_WORDS];
+__u32 syncookie_secret[2][16-4+SHA_DIGEST_WORDS];
+EXPORT_SYMBOL(syncookie_secret);
 
 static __init int init_syncookies(void)
 {
        get_random_bytes(syncookie_secret, sizeof(syncookie_secret));
        return 0;
 }
-module_init(init_syncookies);
+__initcall(init_syncookies);
 
 #define COOKIEBITS 24  /* Upper bits store count */
 #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)
@@ -42,7 +41,7 @@ static u32 cookie_hash(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport,
 {
        __u32 *tmp = __get_cpu_var(cookie_scratch);
 
-       memcpy(tmp + 3, syncookie_secret[c], sizeof(syncookie_secret[c]));
+       memcpy(tmp + 4, syncookie_secret[c], sizeof(syncookie_secret[c]));
        tmp[0] = (__force u32)saddr;
        tmp[1] = (__force u32)daddr;
        tmp[2] = ((__force u32)sport << 16) + (__force u32)dport;
This page took 0.029079 seconds and 5 git commands to generate.