From 0a4df44c7f0eaf8e7560338fec543d52027ff374 Mon Sep 17 00:00:00 2001 From: Nick Porter Date: Mon, 29 Apr 2024 09:34:28 +0100 Subject: [PATCH] Use correct time value --- src/modules/rlm_totp/totp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rlm_totp/totp.c b/src/modules/rlm_totp/totp.c index 4594f2ad96..67f4ae823c 100644 --- a/src/modules/rlm_totp/totp.c +++ b/src/modules/rlm_totp/totp.c @@ -104,7 +104,7 @@ int fr_totp_cmp(fr_totp_t const *cfg, request_t *request, time_t now, uint8_t co */ for (i = 0, then = now; i <= cfg->lookback_steps; i++, then -= cfg->lookback_interval) { - padded = ((uint64_t) now) / cfg->time_step; + padded = ((uint64_t) then) / cfg->time_step; data[0] = padded >> 56; data[1] = padded >> 48; data[2] = padded >> 40; -- 2.47.3