Honor the CE bit even when the CWR bit is set.

PR:		145600
Submitted by:	Richard Scheffenegger <rs at netapp.com>
MFC after:	1 week
This commit is contained in:
Rui Paulo 2010-04-10 12:47:06 +00:00
parent e259b9c75e
commit 9c251892c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=206456

View File

@ -1134,6 +1134,8 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
* TCP ECN processing.
*/
if (tp->t_flags & TF_ECN_PERMIT) {
if (thflags & TH_CWR)
tp->t_flags &= ~TF_ECN_SND_ECE;
switch (iptos & IPTOS_ECN_MASK) {
case IPTOS_ECN_CE:
tp->t_flags |= TF_ECN_SND_ECE;
@ -1146,10 +1148,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so,
TCPSTAT_INC(tcps_ecn_ect1);
break;
}
if (thflags & TH_CWR)
tp->t_flags &= ~TF_ECN_SND_ECE;
/*
* Congestion experienced.
* Ignore if we are already trying to recover.