Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1cd8f78 authored by Ilpo Jrvinen's avatar Ilpo Jrvinen Committed by David S. Miller
Browse files

[TCP] FRTO: Clear frto_highmark only after process_frto that uses it



I broke this in commit 3de96471:

	[TCP]: Wrap-safed reordering detection FRTO check

tcp_process_frto should always see a valid frto_highmark. An invalid
frto_highmark (zero) is very likely what ultimately caused a seqno
compare in tcp_frto_enter_loss to do the wrong leading to the LOST-bit
leak.

Having LOST-bits integry ensured like done after commit
23aeeec3:

	[TCP] FRTO: Plug potential LOST-bit leak

won't hurt. It may still be useful in some other, possibly legimate,
scenario.

Reported by Chazarain Guillaume <guichaz@yahoo.fr>.

Signed-off-by: default avatarIlpo Jrvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c67625a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3113,11 +3113,11 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
	/* See if we can take anything off of the retransmit queue. */
	flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets);

	if (tp->frto_counter)
		frto_cwnd = tcp_process_frto(sk, flag);
	/* Guarantee sacktag reordering detection against wrap-arounds */
	if (before(tp->frto_highmark, tp->snd_una))
		tp->frto_highmark = 0;
	if (tp->frto_counter)
		frto_cwnd = tcp_process_frto(sk, flag);

	if (tcp_ack_is_dubious(sk, flag)) {
		/* Advance CWND, if state allows this. */