From 90d33ef36ac04ed095096f5986d66aee419e3da6 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Mon, 11 Feb 2013 05:50:17 +0000 Subject: [PATCH] --- yaml --- r: 352429 b: refs/heads/master c: ceaa1fef65a7c2e017b260b879b310dd24888083 h: refs/heads/master i: 352427: f9f0870468d425ae6762a656348317fab0b51064 v: v3 --- [refs] | 2 +- trunk/include/linux/tcp.h | 3 +++ trunk/net/ipv4/tcp.c | 2 ++ trunk/net/ipv4/tcp_minisocks.c | 2 ++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4868d3b71b7e..9237daed4bf6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d0023f820e003857248d14f2213ac3930283f16c +refs/heads/master: ceaa1fef65a7c2e017b260b879b310dd24888083 diff --git a/trunk/include/linux/tcp.h b/trunk/include/linux/tcp.h index 6d0d46138ae8..f28408c07dc2 100644 --- a/trunk/include/linux/tcp.h +++ b/trunk/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 diff --git a/trunk/net/ipv4/tcp.c b/trunk/net/ipv4/tcp.c index 2c7e5963c2ea..8a90bda96038 100644 --- a/trunk/net/ipv4/tcp.c +++ b/trunk/net/ipv4/tcp.c @@ -400,6 +400,8 @@ void tcp_init_sock(struct sock *sk) tcp_enable_early_retrans(tp); icsk->icsk_ca_ops = &tcp_init_congestion_ops; + tp->tsoffset = 0; + sk->sk_state = TCP_CLOSE; sk->sk_write_space = sk_stream_write_space; diff --git a/trunk/net/ipv4/tcp_minisocks.c b/trunk/net/ipv4/tcp_minisocks.c index f0409287b5f4..4dfc99f54f67 100644 --- a/trunk/net/ipv4/tcp_minisocks.c +++ b/trunk/net/ipv4/tcp_minisocks.c @@ -288,6 +288,7 @@ void tcp_time_wait(struct sock *sk, int state, int timeo) tcptw->tw_rcv_wnd = tcp_receive_window(tp); tcptw->tw_ts_recent = tp->rx_opt.ts_recent; tcptw->tw_ts_recent_stamp = tp->rx_opt.ts_recent_stamp; + tcptw->tw_ts_offset = tp->tsoffset; #if IS_ENABLED(CONFIG_IPV6) if (tw->tw_family == PF_INET6) { @@ -499,6 +500,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct request_sock *req, newtp->rx_opt.ts_recent_stamp = 0; newtp->tcp_header_len = sizeof(struct tcphdr); } + newtp->tsoffset = 0; #ifdef CONFIG_TCP_MD5SIG newtp->md5sig_info = NULL; /*XXX*/ if (newtp->af_specific->md5_lookup(sk, newsk))