Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Sep 2020 13:44:36 +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: r365573 - in stable/12/sys/netinet: . tcp_stacks
Message-ID:  <202009101344.08ADiaRT087363@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Sep 10 13:44:35 2020
New Revision: 365573
URL: https://svnweb.freebsd.org/changeset/base/365573

Log:
  MFC r357114:
  As a TCP client only enable ECN when the corresponding sysctl variable
  indicates that ECN should be negotiated for the client side.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==============================================================================
--- stable/12/sys/netinet/tcp_input.c	Thu Sep 10 13:27:53 2020	(r365572)
+++ stable/12/sys/netinet/tcp_input.c	Thu Sep 10 13:44:35 2020	(r365573)
@@ -2044,7 +2044,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
 				tp->t_flags |= TF_ACKNOW;
 
 			if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
-			    V_tcp_do_ecn) {
+			    (V_tcp_do_ecn == 1)) {
 				tp->t_flags |= TF_ECN_PERMIT;
 				TCPSTAT_INC(tcps_ecn_shs);
 			}

Modified: stable/12/sys/netinet/tcp_stacks/rack.c
==============================================================================
--- stable/12/sys/netinet/tcp_stacks/rack.c	Thu Sep 10 13:27:53 2020	(r365572)
+++ stable/12/sys/netinet/tcp_stacks/rack.c	Thu Sep 10 13:44:35 2020	(r365573)
@@ -5416,7 +5416,8 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, st
 			tp->t_flags |= TF_ACKNOW;
 		}
 
-		if ((thflags & TH_ECE) && V_tcp_do_ecn) {
+		if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
+		    (V_tcp_do_ecn == 1)) {
 			tp->t_flags |= TF_ECN_PERMIT;
 			TCPSTAT_INC(tcps_ecn_shs);
 		}



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