Fix edge cases with ticks wrapping from INT_MAX to INT_MIN in the handling
of the per-tcpcb t_badtrxtwin. Submitted by: bde
This commit is contained in:
parent
9f78a87a06
commit
6dfb8b316c
@ -1296,7 +1296,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
* "bad retransmit" recovery.
|
||||
*/
|
||||
if (tp->t_rxtshift == 1 &&
|
||||
ticks < tp->t_badrxtwin) {
|
||||
(int)(ticks - tp->t_badrxtwin) < 0) {
|
||||
TCPSTAT_INC(tcps_sndrexmitbad);
|
||||
tp->snd_cwnd = tp->snd_cwnd_prev;
|
||||
tp->snd_ssthresh =
|
||||
@ -2253,7 +2253,7 @@ process_ACK:
|
||||
* original cwnd and ssthresh, and proceed to transmit where
|
||||
* we left off.
|
||||
*/
|
||||
if (tp->t_rxtshift == 1 && ticks < tp->t_badrxtwin) {
|
||||
if (tp->t_rxtshift == 1 && (int)(ticks - tp->t_badrxtwin) < 0) {
|
||||
TCPSTAT_INC(tcps_sndrexmitbad);
|
||||
tp->snd_cwnd = tp->snd_cwnd_prev;
|
||||
tp->snd_ssthresh = tp->snd_ssthresh_prev;
|
||||
|
Loading…
x
Reference in New Issue
Block a user