diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 0630e288c20f..1a8887984b7f 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -338,10 +338,10 @@ tcp_default_output(struct tcpcb *tp) len = ((int32_t)ulmin(cwin, SEQ_SUB(p->end, p->rxmit))); } - off = SEQ_SUB(p->rxmit, tp->snd_una); - KASSERT(off >= 0,("%s: sack block to the left of una : %d", - __func__, off)); if (len > 0) { + off = SEQ_SUB(p->rxmit, tp->snd_una); + KASSERT(off >= 0,("%s: sack block to the left of una : %d", + __func__, off)); sack_rxmit = 1; sendalot = 1; TCPSTAT_INC(tcps_sack_rexmits);