mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 14:48:57 +00:00
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@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D18996
This commit is contained in:
parent
701957cbb6
commit
bf7fcdb18a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343525
@ -2010,7 +2010,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
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);
|
||||
}
|
||||
|
@ -5233,7 +5233,8 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, struct socket *so,
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user