tcp: stop spurious rescue retransmissions and potential asserts

Reported by: pho@
MFC after: 3 days
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29970
This commit is contained in:
Richard Scheffenegger 2021-04-28 14:56:14 +02:00
parent 18f21f0355
commit 48be5b976e
2 changed files with 4 additions and 1 deletions

View File

@ -506,6 +506,7 @@ cc_post_recovery(struct tcpcb *tp, struct tcphdr *th)
}
/* XXXLAS: EXIT_RECOVERY ? */
tp->t_bytes_acked = 0;
tp->sackhint.delivered_data = 0;
tp->sackhint.prr_out = 0;
}

View File

@ -872,9 +872,11 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th)
tcp_seq highdata = tp->snd_max;
if (tp->t_flags & TF_SENTFIN)
highdata--;
if (th->th_ack != highdata)
if (th->th_ack != highdata) {
tp->snd_fack = th->th_ack;
(void)tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack,
highdata - maxseg), highdata, NULL);
}
}
(void) tp->t_fb->tfb_tcp_output(tp);
}