Skip to content

Commit

Permalink
As a TCP client only enable ECN when the corresponding sysctl variable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tuexen committed Jan 25, 2020
1 parent b6a0d88 commit a2d5969
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sys/netinet/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion sys/netinet/tcp_stacks/rack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a2d5969

Please sign in to comment.