rack: Fix ECN on finalizing session.

Maintain code similarity between RACK and base stack
for ECN. This may not strictly be necessary, depending
when a state transition to FIN_WAIT_1 is done in RACK
after a shutdown() or close() syscall.

MFC after: 3 days
Reviewed By: tuexen, #transport
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D29658
This commit is contained in:
Richard Scheffenegger 2021-04-17 20:16:06 +02:00
parent 8c6732ac77
commit 2e97826052

View File

@ -13438,7 +13438,7 @@ rack_output(struct tcpcb *tp)
flags |= TH_ECE;
tp->t_flags2 &= ~TF2_ECN_SND_ECE;
}
if (tp->t_state == TCPS_ESTABLISHED &&
if (TCPS_HAVEESTABLISHED(tp->t_state) &&
(tp->t_flags2 & TF2_ECN_PERMIT)) {
/*
* If the peer has ECN, mark data packets with ECN capable