Index: tcp_stacks/bbr.c =================================================================== --- tcp_stacks/bbr.c +++ tcp_stacks/bbr.c @@ -6028,7 +6028,7 @@ * or FIN if seq_out is adding more on and a FIN is present * (and we are not resending). */ - if (th_flags & TH_SYN) + if ((th_flags & TH_SYN) && (tp->iss == seq_out)) len++; if (th_flags & TH_FIN) len++; Index: tcp_stacks/rack.c =================================================================== --- tcp_stacks/rack.c +++ tcp_stacks/rack.c @@ -6237,7 +6237,7 @@ * or FIN if seq_out is adding more on and a FIN is present * (and we are not resending). */ - if (th_flags & TH_SYN) + if ((th_flags & TH_SYN) && (seq_out == tp->iss)) len++; if (th_flags & TH_FIN) len++; @@ -6280,6 +6280,7 @@ rsm->usec_orig_send = us_cts; if (th_flags & TH_SYN) { /* The data space is one beyond snd_una */ + rsm->r_flags |= RACK_HAS_SIN; rsm->r_start = seq_out + 1; rsm->r_end = rsm->r_start + (len - 1); } else { @@ -12563,8 +12564,10 @@ len = 0; } /* Without fast-open there should never be data sent on a SYN */ - if ((flags & TH_SYN) && (!IS_FASTOPEN(tp->t_flags))) + if ((flags & TH_SYN) && (!IS_FASTOPEN(tp->t_flags))) { + tp->snd_nxt = tp->iss; len = 0; + } orig_len = len; if (len <= 0) { /* Index: tcp_stacks/tcp_rack.h =================================================================== --- tcp_stacks/tcp_rack.h +++ tcp_stacks/tcp_rack.h @@ -39,6 +39,7 @@ #define RACK_RWND_COLLAPSED 0x0100/* The peer collapsed the rwnd on the segment */ #define RACK_APP_LIMITED 0x0200/* We went app limited after this send */ #define RACK_WAS_ACKED 0x0400/* a RTO undid the ack, but it already had a rtt calc done */ +#define RACK_HAS_SIN 0x0800/* SIN is on this guy */ #define RACK_NUM_OF_RETRANS 3 #define RACK_INITIAL_RTO 1000 /* 1 second in milli seconds */