svn commit: r357816 - head/sys/netinet

Randall Stewart rrs at FreeBSD.org
Wed Feb 12 13:04:19 UTC 2020


Author: rrs
Date: Wed Feb 12 13:04:19 2020
New Revision: 357816
URL: https://svnweb.freebsd.org/changeset/base/357816

Log:
  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.
  
  Sponsored by:	Netflix Inc.
  Differential Revision:	https://reviews.freebsd.org/D23645

Modified:
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c	Wed Feb 12 12:40:06 2020	(r357815)
+++ head/sys/netinet/tcp_syncache.c	Wed Feb 12 13:04:19 2020	(r357816)
@@ -1668,7 +1668,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-head mailing list