summaryrefslogtreecommitdiffstats
path: root/include/linux/tcp.h
diff options
context:
space:
mode:
authorAndrey Vagin <avagin@openvz.org>2013-02-11 05:50:17 +0000
committerDavid S. Miller <davem@davemloft.net>2013-02-13 13:22:15 -0500
commitceaa1fef65a7c2e017b260b879b310dd24888083 (patch)
treef511458ce6431cd4b5f5b46f4c633f73e49a3589 /include/linux/tcp.h
parentd0023f820e003857248d14f2213ac3930283f16c (diff)
downloadtalos-obmc-linux-ceaa1fef65a7c2e017b260b879b310dd24888083.tar.gz
talos-obmc-linux-ceaa1fef65a7c2e017b260b879b310dd24888083.zip
tcp: adding a per-socket timestamp offset
This functionality is used for restoring tcp sockets. A tcp timestamp depends on how long a system has been running, so it's differ for each host. The solution is to set a per-socket offset. A per-socket offset for a TIME_WAIT socket is inherited from a proper tcp socket. tcp_request_sock doesn't have a timestamp offset, because the repair mode for them are not implemented. Cc: "David S. Miller" <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Cc: Eric Dumazet <edumazet@google.com> Cc: Pavel Emelyanov <xemul@parallels.com> Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/tcp.h')
-rw-r--r--include/linux/tcp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 6d0d46138ae8..f28408c07dc2 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -162,6 +162,8 @@ struct tcp_sock {
u32 rcv_tstamp; /* timestamp of last received ACK (for keepalives) */
u32 lsndtime; /* timestamp of last sent data packet (for restart window) */
+ u32 tsoffset; /* timestamp offset */
+
struct list_head tsq_node; /* anchor in tsq_tasklet.head list */
unsigned long tsq_flags;
@@ -353,6 +355,7 @@ struct tcp_timewait_sock {
u32 tw_rcv_nxt;
u32 tw_snd_nxt;
u32 tw_rcv_wnd;
+ u32 tw_ts_offset;
u32 tw_ts_recent;
long tw_ts_recent_stamp;
#ifdef CONFIG_TCP_MD5SIG
OpenPOWER on IntegriCloud