git: ab001fcdf22d - main - tcp: Apply tcp flags after ECN processing in rack_fast_output()

From: Richard Scheffenegger <rscheff_at_FreeBSD.org>
Date: Mon, 07 Feb 2022 13:33:03 UTC
The branch main has been updated by rscheff:

URL: https://cgit.FreeBSD.org/src/commit/?id=ab001fcdf22d8ea7ffad43f8e7896b73c0fdc3b6

commit ab001fcdf22d8ea7ffad43f8e7896b73c0fdc3b6
Author:     Richard Scheffenegger <rscheff@FreeBSD.org>
AuthorDate: 2022-02-07 02:27:38 +0000
Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
CommitDate: 2022-02-07 02:28:27 +0000

    tcp: Apply tcp flags after ECN processing in rack_fast_output()
    
    Missed to move the tcp_set_flags() past ECN processing
    in rack_fast_output() earlier.
    
    Reviewed By: rrs, #transport
    Sponsored by:        NetApp, Inc.
    Differential Revision: https://reviews.freebsd.org/D34180
---
 sys/netinet/tcp_stacks/rack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c
index 459520a4a0bb..8df5ae09574b 100644
--- a/sys/netinet/tcp_stacks/rack.c
+++ b/sys/netinet/tcp_stacks/rack.c
@@ -16489,7 +16489,6 @@ again:
 	sb_offset = tp->snd_max - tp->snd_una;
 	th->th_seq = htonl(tp->snd_max);
 	th->th_ack = htonl(tp->rcv_nxt);
-	tcp_set_flags(th, flags);
 	th->th_win = htons((u_short)(rack->r_ctl.fsb.recwin >> tp->rcv_scale));
 	if (th->th_win == 0) {
 		tp->t_sndzerowin++;
@@ -16552,6 +16551,7 @@ again:
 			ip->ip_tos |= ect;
 		}
 	}
+	tcp_set_flags(th, flags);
 	m->m_pkthdr.len = hdrlen + len;	/* in6_cksum() need this */
 #ifdef INET6
 	if (rack->r_is_v6) {