Author: tuexen
Date: Thu Sep 10 16:59:54 2020
New Revision: 365589
URL: https://svnweb.freebsd.org/changeset/base/365589

Log:
  MFC r357100:
  
  The server side of TCP fast open relies on the delayed ACK timer to allow
  including user data in the SYN-ACK. When DSACK support was added in
  r347382, an immediate ACK was sent even for the received SYN with
  user data. This patch fixes that and allows again to send user data with
  the SYN-ACK.

Modified:
  stable/12/sys/netinet/tcp_input.c
  stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/tcp_input.c
==============================================================================
--- stable/12/sys/netinet/tcp_input.c   Thu Sep 10 16:47:12 2020        
(r365588)
+++ stable/12/sys/netinet/tcp_input.c   Thu Sep 10 16:59:54 2020        
(r365589)
@@ -2299,7 +2299,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru
                /*
                 * DSACK - add SACK block for dropped range
                 */
-               if (tp->t_flags & TF_SACK_PERMIT) {
+               if ((todrop > 0) && (tp->t_flags & TF_SACK_PERMIT)) {
                        tcp_update_sack_list(tp, th->th_seq,
                            th->th_seq + todrop);
                        /*

Modified: stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c
==============================================================================
--- stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c  Thu Sep 10 16:47:12 
2020        (r365588)
+++ stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c  Thu Sep 10 16:59:54 
2020        (r365589)
@@ -495,7 +495,7 @@ ctf_drop_checks(struct tcpopt *to, struct mbuf *m, str
                /*
                 * DSACK - add SACK block for dropped range
                 */
-               if (tp->t_flags & TF_SACK_PERMIT) {
+               if ((todrop > 0) && (tp->t_flags & TF_SACK_PERMIT)) {
                        tcp_update_sack_list(tp, th->th_seq, th->th_seq + tlen);
                        /*
                         * ACK now, as the next in-sequence segment
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to