diff options
author | Florian Westphal <fw@strlen.de> | 2008-04-10 12:12:40 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-10 12:12:40 +0200 |
commit | 4dfc2817025965a2fc78a18c50f540736a6b5c24 (patch) | |
tree | f8f2f76e660d9d5c7a0f39ed8a79cb6d6d181206 /include/net/request_sock.h | |
parent | IPV4: fib_trie use vmalloc for large tnodes (diff) | |
download | linux-4dfc2817025965a2fc78a18c50f540736a6b5c24.tar.xz linux-4dfc2817025965a2fc78a18c50f540736a6b5c24.zip |
[Syncookies]: Add support for TCP options via timestamps.
Allow the use of SACK and window scaling when syncookies are used
and the client supports tcp timestamps. Options are encoded into
the timestamp sent in the syn-ack and restored from the timestamp
echo when the ack is received.
Based on earlier work by Glenn Griffin.
This patch avoids increasing the size of structs by encoding TCP
options into the least significant bits of the timestamp and
by not using any 'timestamp offset'.
The downside is that the timestamp sent in the packet after the synack
will increase by several seconds.
changes since v1:
don't duplicate timestamp echo decoding function, put it into ipv4/syncookie.c
and have ipv6/syncookies.c use it.
Feedback from Glenn Griffin: fix line indented with spaces, kill redundant if ()
Reviewed-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/request_sock.h')
-rw-r--r-- | include/net/request_sock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/request_sock.h b/include/net/request_sock.h index 0369f98e9f3a..b220b5f624de 100644 --- a/include/net/request_sock.h +++ b/include/net/request_sock.h @@ -45,7 +45,7 @@ struct request_sock { struct request_sock *dl_next; /* Must be first member! */ u16 mss; u8 retrans; - u8 __pad; + u8 cookie_ts; /* syncookie: encode tcpopts in timestamp */ /* The following two fields can be easily recomputed I think -AK */ u32 window_clamp; /* window clamp at creation time */ u32 rcv_wnd; /* rcv_wnd offered first time */ |