diff --git a/sys/netinet/cc/cc.c b/sys/netinet/cc/cc.c --- a/sys/netinet/cc/cc.c +++ b/sys/netinet/cc/cc.c @@ -492,7 +492,7 @@ if (V_tcp_do_newsack) { pipe = tcp_compute_pipe(ccv->ccvc.tcp); } else { - pipe = CCV(ccv, snd_nxt) - + pipe = CCV(ccv, snd_max) - CCV(ccv, snd_fack) + CCV(ccv, sackhint.sack_bytes_rexmit); } diff --git a/sys/netinet/cc/cc_cubic.c b/sys/netinet/cc/cc_cubic.c --- a/sys/netinet/cc/cc_cubic.c +++ b/sys/netinet/cc/cc_cubic.c @@ -479,7 +479,7 @@ if (V_tcp_do_newsack) { pipe = tcp_compute_pipe(ccv->ccvc.tcp); } else { - pipe = CCV(ccv, snd_nxt) - + pipe = CCV(ccv, snd_max) - CCV(ccv, snd_fack) + CCV(ccv, sackhint.sack_bytes_rexmit); } diff --git a/sys/netinet/cc/cc_dctcp.c b/sys/netinet/cc/cc_dctcp.c --- a/sys/netinet/cc/cc_dctcp.c +++ b/sys/netinet/cc/cc_dctcp.c @@ -296,7 +296,7 @@ if (V_tcp_do_newsack) { pipe = tcp_compute_pipe(ccv->ccvc.tcp); } else { - pipe = CCV(ccv, snd_nxt) - + pipe = CCV(ccv, snd_max) - CCV(ccv, snd_fack) + CCV(ccv, sackhint.sack_bytes_rexmit); } diff --git a/sys/netinet/cc/cc_htcp.c b/sys/netinet/cc/cc_htcp.c --- a/sys/netinet/cc/cc_htcp.c +++ b/sys/netinet/cc/cc_htcp.c @@ -327,7 +327,7 @@ if (V_tcp_do_newsack) { pipe = tcp_compute_pipe(ccv->ccvc.tcp); } else { - pipe = CCV(ccv, snd_nxt) - + pipe = CCV(ccv, snd_max) - CCV(ccv, snd_fack) + CCV(ccv, sackhint.sack_bytes_rexmit); } diff --git a/sys/netinet/cc/cc_newreno.c b/sys/netinet/cc/cc_newreno.c --- a/sys/netinet/cc/cc_newreno.c +++ b/sys/netinet/cc/cc_newreno.c @@ -431,7 +431,7 @@ if (V_tcp_do_newsack) { pipe = tcp_compute_pipe(ccv->ccvc.tcp); } else { - pipe = CCV(ccv, snd_nxt) - + pipe = CCV(ccv, snd_max) - CCV(ccv, snd_fack) + CCV(ccv, sackhint.sack_bytes_rexmit); } diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -461,6 +461,10 @@ tp->t_badrxtwin = 0; break; } + if (SEQ_LT(tp->snd_fack, tp->snd_una) || + SEQ_GT(tp->snd_fack, tp->snd_max)) { + tp->snd_fack = tp->snd_una; + } if (CC_ALGO(tp)->cong_signal != NULL) { if (th != NULL)