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); } _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"