Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2023 11:09:25 GMT
From:      Randall Stewart <rrs@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 960985a209f2 - main - tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend off ECN however our syncache is not aware of that flag.
Message-ID:  <202304191109.33JB9PBD064689@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rrs:

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

commit 960985a209f28c3de776003be18c8238e9378d31
Author:     Randall Stewart <rrs@FreeBSD.org>
AuthorDate: 2023-04-18 16:21:56 +0000
Commit:     Randall Stewart <rrs@FreeBSD.org>
CommitDate: 2023-04-18 16:21:56 +0000

    tcp: bbr.c is non-capable of doing ECN and sets an INP flag to fend off ECN however our syncache is not aware of that flag.
    
    We need to make the syncache aware of the flag and not do ECN if its set. Note that this
    is not 100% full proof but the best we can do (i.e. its still possible that you can get in a
    situation where the peer try's to do ecn).
    
    Reviewed by: tuexen, glebius, rscheff
    Sponsored by: Netflix Inc
    Differential Revision:https://reviews.freebsd.org/D39672
---
 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 96f57b9e0d95..5f4bae92974e 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -1724,7 +1724,7 @@ skip_alloc:
 	if (ltflags & TF_NOOPT)
 		sc->sc_flags |= SCF_NOOPT;
 	/* ECN Handshake */
-	if (V_tcp_do_ecn)
+	if (V_tcp_do_ecn && (inp->inp_flags2 & INP_CANNOT_DO_ECN) == 0)
 		sc->sc_flags |= tcp_ecn_syncache_add(tcp_get_flags(th), iptos);
 
 	if (V_tcp_syncookies)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304191109.33JB9PBD064689>