Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2020 17:03:37 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r365590 - stable/12/sys/netinet
Message-ID:  <202009101703.08AH3boX011265@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Sep 10 17:03:36 2020
New Revision: 365590
URL: https://svnweb.freebsd.org/changeset/base/365590

Log:
  MFC r357816 (from rrs)
  
  This small fix makes it so we properly follow
  the RFC and only enable ECN when both the
  CWR and ECT bits our set within the SYN packet.

Modified:
  stable/12/sys/netinet/tcp_syncache.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_syncache.c
==============================================================================
--- stable/12/sys/netinet/tcp_syncache.c	Thu Sep 10 16:59:54 2020	(r365589)
+++ stable/12/sys/netinet/tcp_syncache.c	Thu Sep 10 17:03:36 2020	(r365590)
@@ -1607,7 +1607,8 @@ skip_alloc:
 		sc->sc_peer_mss = to->to_mss;	/* peer mss may be zero */
 	if (ltflags & TF_NOOPT)
 		sc->sc_flags |= SCF_NOOPT;
-	if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn)
+	if (((th->th_flags & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) &&
+	    V_tcp_do_ecn)
 		sc->sc_flags |= SCF_ECN;
 
 	if (V_tcp_syncookies)



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