tcp rack: improve handling of front states

When the RACK stack wants to send a FIN, but still has outstanding
or unsent data, it sends a challenge ack. Don't do this when the
TCP endpoint is still in the front states, since it does not
make sense.
Reviewed by:		rrs
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D45122
This commit is contained in:
Michael Tuexen 2024-05-11 16:28:45 +02:00
parent c1ebd76c3f
commit 2f923a0ced

View file

@ -22776,7 +22776,8 @@ send:
* is acked first.
*/
flags &= ~TH_FIN;
if ((sbused(sb) == (tp->snd_max - tp->snd_una)) &&
if (TCPS_HAVEESTABLISHED(tp->t_state) &&
(sbused(sb) == (tp->snd_max - tp->snd_una)) &&
((tp->snd_max - tp->snd_una) <= segsiz)) {
/*
* Ok less than or right at a MSS is