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

!3483 net: Remove acked SYN flag from packet in the transmit queue correctly

parents a59a7e78 579e1fbc
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2943,7 +2943,13 @@ int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs)
	if (skb_still_in_host_queue(sk, skb))
		return -EBUSY;

start:
	if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) {
		if (unlikely(TCP_SKB_CB(skb)->tcp_flags & TCPHDR_SYN)) {
			TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_SYN;
			TCP_SKB_CB(skb)->seq++;
			goto start;
		}
		if (unlikely(before(TCP_SKB_CB(skb)->end_seq, tp->snd_una))) {
			WARN_ON_ONCE(1);
			return -EINVAL;