svn commit: r347081 - in stable/12/sys/netinet: . tcp_stacks
Michael Tuexen
tuexen at FreeBSD.org
Sat May 4 09:07:55 UTC 2019
Author: tuexen
Date: Sat May 4 09:07:53 2019
New Revision: 347081
URL: https://svnweb.freebsd.org/changeset/base/347081
Log:
MFC r343525:
Fix the detection of ECN-setup SYN-ACK packets.
RFC 3168 defines an ECN-setup SYN-ACK packet as on with the ECE flags
set and the CWR flags not set. The code was only checking if ECE flag
is set. This patch adds the check to verify that the CWR flags is not
set.
Submitted by: Richard Scheffenegger
Reviewed by: tuexen@
Differential Revision: https://reviews.freebsd.org/D18996
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 Sat May 4 09:01:56 2019 (r347080)
+++ stable/12/sys/netinet/tcp_input.c Sat May 4 09:07:53 2019 (r347081)
@@ -2027,7 +2027,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
else
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) {
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 Sat May 4 09:01:56 2019 (r347080)
+++ stable/12/sys/netinet/tcp_stacks/rack.c Sat May 4 09:07:53 2019 (r347081)
@@ -5245,7 +5245,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) {
tp->t_flags |= TF_ECN_PERMIT;
TCPSTAT_INC(tcps_ecn_shs);
}
More information about the svn-src-all
mailing list