git: 8fee873d78eb - stable/14 - tcp: keep syncache flags when updating ECN info

From: Richard Scheffenegger <rscheff_at_FreeBSD.org>
Date: Sun, 22 Sep 2024 16:25:09 UTC
The branch stable/14 has been updated by rscheff:

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

commit 8fee873d78eb8d04ffbc079d0ee01549f5c0d556
Author:     Richard Scheffenegger <rscheff@FreeBSD.org>
AuthorDate: 2024-09-18 09:18:00 +0000
Commit:     Richard Scheffenegger <rscheff@FreeBSD.org>
CommitDate: 2024-09-22 16:24:36 +0000

    tcp: keep syncache flags when updating ECN info
    
    While processing the ECN flags of an incoming packet,
    incorrectly cleared all other syncache flags.
    
    Reported by: tuexen
    Reviewed By: tuexen, #transport
    Sponsored by: NetApp, Inc.
    MFC after: 3 days
    Differential Revision: https://reviews.freebsd.org/D46694
    
    (cherry picked from commit 0a05ea1f56e65ec0477d56daf5ed623087464082)
---
 sys/netinet/tcp_syncache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index e24249048fd6..6e71d14196f5 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1536,7 +1536,7 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
 		 */
 		if (sc->sc_flags & SCF_ECN_MASK) {
 			sc->sc_flags &= ~SCF_ECN_MASK;
-			sc->sc_flags = tcp_ecn_syncache_add(tcp_get_flags(th), iptos);
+			sc->sc_flags |= tcp_ecn_syncache_add(tcp_get_flags(th), iptos);
 		}
 #ifdef MAC
 		/*