diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index cd6238f10401..d2f946034c60 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1681,8 +1681,13 @@ timer: tp->sackhint.sack_bytes_rexmit -= len; KASSERT(tp->sackhint.sack_bytes_rexmit >= 0, ("sackhint bytes rtx >= 0")); - } else + KASSERT((flags & TH_FIN) == 0, + ("error while FIN with SACK rxmit")); + } else { tp->snd_nxt -= len; + if (flags & TH_FIN) + tp->snd_nxt--; + } } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) {