This small fix makes it so we properly follow
the RFC and only enable ECN when both the CWR and ECT bits our set within the SYN packet. Sponsored by: Netflix Inc. Differential Revision: https://reviews.freebsd.org/D23645
This commit is contained in:
parent
3fba40d9f2
commit
596ae436ef
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357816
@ -1668,7 +1668,8 @@ syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th,
|
||||
sc->sc_peer_mss = to->to_mss; /* peer mss may be zero */
|
||||
if (ltflags & TF_NOOPT)
|
||||
sc->sc_flags |= SCF_NOOPT;
|
||||
if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn)
|
||||
if (((th->th_flags & (TH_ECE|TH_CWR)) == (TH_ECE|TH_CWR)) &&
|
||||
V_tcp_do_ecn)
|
||||
sc->sc_flags |= SCF_ECN;
|
||||
|
||||
if (V_tcp_syncookies)
|
||||
|
Loading…
Reference in New Issue
Block a user