diff options
author | Glenn Griffin <ggriffin.kernel@gmail.com> | 2008-02-08 00:49:26 -0500 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-03-04 01:18:21 -0500 |
commit | c6aefafb7ec620911d46174eed514f9df639e5a4 (patch) | |
tree | 626e3d47a7bb31f586935c480bed09f342f2fbca /net/ipv4 | |
parent | 11baab7ac34723ad481e0f97fca733272ef364d4 (diff) |
[TCP]: Add IPv6 support to TCP SYN cookies
Updated to incorporate Eric's suggestion of using a per cpu buffer
rather than allocating on the stack. Just a two line change, but will
resend in it's entirety.
Signed-off-by: Glenn Griffin <ggriffin.kernel@gmail.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/syncookies.c | 7 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 1 | ||||
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c index 177da14f6b14..4704f27f6c0b 100644 --- a/net/ipv4/syncookies.c +++ b/net/ipv4/syncookies.c | |||
@@ -10,8 +10,6 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * $Id: syncookies.c,v 1.18 2002/02/01 22:01:04 davem Exp $ | 12 | * $Id: syncookies.c,v 1.18 2002/02/01 22:01:04 davem Exp $ |
13 | * | ||
14 | * Missing: IPv6 support. | ||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #include <linux/tcp.h> | 15 | #include <linux/tcp.h> |
@@ -23,14 +21,15 @@ | |||
23 | 21 | ||
24 | extern int sysctl_tcp_syncookies; | 22 | extern int sysctl_tcp_syncookies; |
25 | 23 | ||
26 | static __u32 syncookie_secret[2][16-3+SHA_DIGEST_WORDS]; | 24 | __u32 syncookie_secret[2][16-3+SHA_DIGEST_WORDS]; |
25 | EXPORT_SYMBOL(syncookie_secret); | ||
27 | 26 | ||
28 | static __init int init_syncookies(void) | 27 | static __init int init_syncookies(void) |
29 | { | 28 | { |
30 | get_random_bytes(syncookie_secret, sizeof(syncookie_secret)); | 29 | get_random_bytes(syncookie_secret, sizeof(syncookie_secret)); |
31 | return 0; | 30 | return 0; |
32 | } | 31 | } |
33 | module_init(init_syncookies); | 32 | __initcall(init_syncookies); |
34 | 33 | ||
35 | #define COOKIEBITS 24 /* Upper bits store count */ | 34 | #define COOKIEBITS 24 /* Upper bits store count */ |
36 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) | 35 | #define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1) |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 19c449f62672..93e128c239c4 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -5326,6 +5326,7 @@ discard: | |||
5326 | 5326 | ||
5327 | EXPORT_SYMBOL(sysctl_tcp_ecn); | 5327 | EXPORT_SYMBOL(sysctl_tcp_ecn); |
5328 | EXPORT_SYMBOL(sysctl_tcp_reordering); | 5328 | EXPORT_SYMBOL(sysctl_tcp_reordering); |
5329 | EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); | ||
5329 | EXPORT_SYMBOL(tcp_parse_options); | 5330 | EXPORT_SYMBOL(tcp_parse_options); |
5330 | EXPORT_SYMBOL(tcp_rcv_established); | 5331 | EXPORT_SYMBOL(tcp_rcv_established); |
5331 | EXPORT_SYMBOL(tcp_rcv_state_process); | 5332 | EXPORT_SYMBOL(tcp_rcv_state_process); |
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 0fdd1db641ac..8245247a6ceb 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -35,6 +35,8 @@ | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | int sysctl_tcp_syncookies __read_mostly = SYNC_INIT; | 37 | int sysctl_tcp_syncookies __read_mostly = SYNC_INIT; |
38 | EXPORT_SYMBOL(sysctl_tcp_syncookies); | ||
39 | |||
38 | int sysctl_tcp_abort_on_overflow __read_mostly; | 40 | int sysctl_tcp_abort_on_overflow __read_mostly; |
39 | 41 | ||
40 | struct inet_timewait_death_row tcp_death_row = { | 42 | struct inet_timewait_death_row tcp_death_row = { |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ed750f9ceb07..cbfef8b1f5e8 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2560,6 +2560,7 @@ void tcp_send_probe0(struct sock *sk) | |||
2560 | } | 2560 | } |
2561 | } | 2561 | } |
2562 | 2562 | ||
2563 | EXPORT_SYMBOL(tcp_select_initial_window); | ||
2563 | EXPORT_SYMBOL(tcp_connect); | 2564 | EXPORT_SYMBOL(tcp_connect); |
2564 | EXPORT_SYMBOL(tcp_make_synack); | 2565 | EXPORT_SYMBOL(tcp_make_synack); |
2565 | EXPORT_SYMBOL(tcp_simple_retransmit); | 2566 | EXPORT_SYMBOL(tcp_simple_retransmit); |