Unverified Commit 5c608d31 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15285 tcp: Defer ts_recent changes until req is owned

parents 2a0b33fd 83bb0e48
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -743,9 +743,6 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,

	/* In sequence, PAWS is OK. */

	if (tmp_opt.saw_tstamp && !after(TCP_SKB_CB(skb)->seq, tcp_rsk(req)->rcv_nxt))
		req->ts_recent = tmp_opt.rcv_tsval;

	if (TCP_SKB_CB(skb)->seq == tcp_rsk(req)->rcv_isn) {
		/* Truncate SYN, it is out of window starting
		   at tcp_rsk(req)->rcv_isn + 1. */
@@ -794,6 +791,10 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
	if (!child)
		goto listen_overflow;

	if (own_req && tmp_opt.saw_tstamp &&
	    !after(TCP_SKB_CB(skb)->seq, tcp_rsk(req)->rcv_nxt))
		tcp_sk(child)->rx_opt.ts_recent = tmp_opt.rcv_tsval;

	sock_rps_save_rxhash(child, skb);
	tcp_synack_rtt_meas(child, req);
	*req_stolen = !own_req;