tcp: remove unnecessary update for tp->write_seq in tcp_connect()
Commit 783237e8da ("net-tcp: Fast Open client - sending SYN-data")
introduces tcp_connect_queue_skb() and it would overwrite tcp->write_seq,
so it is no need to update tp->write_seq before invoking
tcp_connect_queue_skb().
Signed-off-by: xin.guo <guoxin0309@gmail.com>
Link: https://patch.msgid.link/1728289544-4611-1-git-send-email-guoxin0309@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -4134,7 +4134,10 @@ int tcp_connect(struct sock *sk)
|
||||
if (unlikely(!buff))
|
||||
return -ENOBUFS;
|
||||
|
||||
tcp_init_nondata_skb(buff, tp->write_seq++, TCPHDR_SYN);
|
||||
/* SYN eats a sequence byte, write_seq updated by
|
||||
* tcp_connect_queue_skb().
|
||||
*/
|
||||
tcp_init_nondata_skb(buff, tp->write_seq, TCPHDR_SYN);
|
||||
tcp_mstamp_refresh(tp);
|
||||
tp->retrans_stamp = tcp_time_stamp_ts(tp);
|
||||
tcp_connect_queue_skb(sk, buff);
|
||||
|
||||
Reference in New Issue
Block a user