Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

I broke this in commit 3de96471bd7fb76406e975ef6387abe3a0698149:

[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
23aeeec365dcf8bc87fae44c533e50d0bb4f23cc:

[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: Ilpo J�rvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Ilpo J�rvinen and committed by
David S. Miller
e1cd8f78 c67625a1

+2 -2
+2 -2
net/ipv4/tcp_input.c
··· 3113 3113 /* See if we can take anything off of the retransmit queue. */ 3114 3114 flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); 3115 3115 3116 + if (tp->frto_counter) 3117 + frto_cwnd = tcp_process_frto(sk, flag); 3116 3118 /* Guarantee sacktag reordering detection against wrap-arounds */ 3117 3119 if (before(tp->frto_highmark, tp->snd_una)) 3118 3120 tp->frto_highmark = 0; 3119 - if (tp->frto_counter) 3120 - frto_cwnd = tcp_process_frto(sk, flag); 3121 3121 3122 3122 if (tcp_ack_is_dubious(sk, flag)) { 3123 3123 /* Advance CWND, if state allows this. */