Author: rpaulo
Date: Sat Apr 10 12:47:06 2010
New Revision: 206456
URL: http://svn.freebsd.org/changeset/base/206456

Log:
  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

Modified:
  head/sys/netinet/tcp_input.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c        Sat Apr 10 12:29:09 2010        
(r206455)
+++ head/sys/netinet/tcp_input.c        Sat Apr 10 12:47:06 2010        
(r206456)
@@ -1134,6 +1134,8 @@ tcp_do_segment(struct mbuf *m, struct tc
         * 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 tc
                        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.
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to