[Syncookies]: Add support for TCP options via timestamps.
authorFlorian Westphal <fw@strlen.de>
Thu, 10 Apr 2008 10:12:40 +0000 (03:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Apr 2008 10:12:40 +0000 (03:12 -0700)
commit4dfc2817025965a2fc78a18c50f540736a6b5c24
treef8f2f76e660d9d5c7a0f39ed8a79cb6d6d181206
parent15be75cdb5db442d0e33d37b20832b88f3ccd383
[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>
include/net/request_sock.h
include/net/tcp.h
net/ipv4/syncookies.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_output.c
net/ipv6/syncookies.c
net/ipv6/tcp_ipv6.c