diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 6095fe534c27..1040c9d90a76 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -3300,13 +3300,7 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc, if (stcb->asoc.peer_supports_prsctp) { if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { /* Is it expired? */ - if ( - /* - * TODO sctp_constants.h needs alternative - * time macros when _KERNEL is undefined. - */ - (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) - ) { + if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { /* Yes so drop it */ if (tp1->data != NULL) { (void)sctp_release_pr_sctp_chunk(stcb, tp1, diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index 5623228c62ca..fb39917eb11d 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -5728,7 +5728,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, while (chk) { nchk = TAILQ_NEXT(chk, sctp_next); /* Here we must move to the sent queue and mark */ - if (PR_SCTP_TTL_ENABLED(chk->flags)) { + if (PR_SCTP_BUF_ENABLED(chk->flags)) { if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { if (chk->data) { /* diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 6db51935898c..949dd2fff85a 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -772,9 +772,7 @@ sctp_mark_all_for_resend(struct sctp_tcb *stcb, } if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ - if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) || - ((chk->rec.data.timetodrop.tv_sec == now.tv_sec) && - (now.tv_usec > chk->rec.data.timetodrop.tv_usec))) { + if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) { /* Yes so drop it */ if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb,