|
@@ -6307,6 +6307,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
|
goto drop;
|
|
goto drop;
|
|
|
|
|
|
tcp_rsk(req)->af_specific = af_ops;
|
|
tcp_rsk(req)->af_specific = af_ops;
|
|
|
|
+ tcp_rsk(req)->ts_off = 0;
|
|
|
|
|
|
tcp_clear_options(&tmp_opt);
|
|
tcp_clear_options(&tmp_opt);
|
|
tmp_opt.mss_clamp = af_ops->mss_clamp;
|
|
tmp_opt.mss_clamp = af_ops->mss_clamp;
|
|
@@ -6328,6 +6329,9 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
|
if (security_inet_conn_request(sk, skb, req))
|
|
if (security_inet_conn_request(sk, skb, req))
|
|
goto drop_and_free;
|
|
goto drop_and_free;
|
|
|
|
|
|
|
|
+ if (isn && tmp_opt.tstamp_ok)
|
|
|
|
+ af_ops->init_seq(skb, &tcp_rsk(req)->ts_off);
|
|
|
|
+
|
|
if (!want_cookie && !isn) {
|
|
if (!want_cookie && !isn) {
|
|
/* VJ's idea. We save last timestamp seen
|
|
/* VJ's idea. We save last timestamp seen
|
|
* from the destination in peer table, when entering
|
|
* from the destination in peer table, when entering
|
|
@@ -6368,7 +6372,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
|
goto drop_and_release;
|
|
goto drop_and_release;
|
|
}
|
|
}
|
|
|
|
|
|
- isn = af_ops->init_seq(skb);
|
|
|
|
|
|
+ isn = af_ops->init_seq(skb, &tcp_rsk(req)->ts_off);
|
|
}
|
|
}
|
|
if (!dst) {
|
|
if (!dst) {
|
|
dst = af_ops->route_req(sk, &fl, req, NULL);
|
|
dst = af_ops->route_req(sk, &fl, req, NULL);
|
|
@@ -6380,6 +6384,7 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
|
|
|
|
|
|
if (want_cookie) {
|
|
if (want_cookie) {
|
|
isn = cookie_init_sequence(af_ops, sk, skb, &req->mss);
|
|
isn = cookie_init_sequence(af_ops, sk, skb, &req->mss);
|
|
|
|
+ tcp_rsk(req)->ts_off = 0;
|
|
req->cookie_ts = tmp_opt.tstamp_ok;
|
|
req->cookie_ts = tmp_opt.tstamp_ok;
|
|
if (!tmp_opt.tstamp_ok)
|
|
if (!tmp_opt.tstamp_ok)
|
|
inet_rsk(req)->ecn_ok = 0;
|
|
inet_rsk(req)->ecn_ok = 0;
|