As a TCP client only enable ECN when the corresponding sysctl variable

indicates that ECN should be negotiated for the client side.

Submitted by:		Richard Scheffenegger
Reviewed by:		rgrimes@, tuexen@
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D23228
This commit is contained in:
Michael Tuexen 2020-01-25 13:11:14 +00:00
parent b6a0d88cbe
commit a2d59694be
2 changed files with 2 additions and 2 deletions

View File

@ -1979,7 +1979,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
tp->t_flags |= TF_ACKNOW;
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
V_tcp_do_ecn) {
(V_tcp_do_ecn == 1)) {
tp->t_flags2 |= TF2_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}

View File

@ -6296,7 +6296,7 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, struct socket *so,
}
if (((thflags & (TH_CWR | TH_ECE)) == TH_ECE) &&
V_tcp_do_ecn) {
(V_tcp_do_ecn == 1)) {
tp->t_flags2 |= TF2_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}