Skip to content

Commit ede9f3b

Browse files
ij1davem330
authored andcommitted
[TCP]: Unite identical code from two seqno split blocks
Bogus seqno compares just mislead, the code is identical for both sides of the seqno compare (and was even executed just once because of return in between). Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 407ef1d commit ede9f3b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

net/ipv4/tcp_input.c

+1-6
Original file line numberDiff line numberDiff line change
@@ -1246,8 +1246,7 @@ static int tcp_sacktag_one(struct sk_buff *skb, struct tcp_sock *tp,
12461246
if (dup_sack && (sacked & TCPCB_RETRANS)) {
12471247
if (after(TCP_SKB_CB(skb)->end_seq, tp->undo_marker))
12481248
tp->undo_retrans--;
1249-
if (!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una) &&
1250-
(sacked & TCPCB_SACKED_ACKED))
1249+
if (sacked & TCPCB_SACKED_ACKED)
12511250
*reord = min(fack_count, *reord);
12521251
}
12531252

@@ -1310,10 +1309,6 @@ static int tcp_sacktag_one(struct sk_buff *skb, struct tcp_sock *tp,
13101309

13111310
if (after(TCP_SKB_CB(skb)->seq, tcp_highest_sack_seq(tp)))
13121311
tp->highest_sack = skb;
1313-
1314-
} else {
1315-
if (dup_sack && (sacked & TCPCB_RETRANS))
1316-
*reord = min(fack_count, *reord);
13171312
}
13181313

13191314
/* D-SACK. We can detect redundant retransmission in S|R and plain R

0 commit comments

Comments
 (0)