diff --git a/src/internal.c b/src/internal.c index df31227ed..1f750fc32 100755 --- a/src/internal.c +++ b/src/internal.c @@ -9669,14 +9669,14 @@ static INLINE int DtlsCheckWindow(WOLFSSL* ssl) break; } } - - if (peerSeq == NULL) { - WOLFSSL_MSG("Couldn't find that peer ID to check window."); - return 0; - } #endif } + if (peerSeq == NULL) { + WOLFSSL_MSG("Could not find peer sequence"); + return 0; + } + if (ssl->keys.curEpoch == peerSeq->nextEpoch) { next_hi = peerSeq->nextSeq_hi; next_lo = peerSeq->nextSeq_lo;