svn commit: r365590 - stable/12/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu Sep 10 17:03:37 UTC 2020


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)


More information about the svn-src-all mailing list