From: Alan T. DeKok Date: Tue, 31 Aug 2021 19:59:22 +0000 (-0400) Subject: increment count before checking mrc X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01b12733ecd0ef1aa064415045e446745304244c;p=thirdparty%2Ffreeradius-server.git increment count before checking mrc --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index cc51ace3e48..4a2ba02e849 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -303,6 +303,8 @@ unlang_frame_action_t result_calculate(request_t *request, unlang_stack_frame_t * Clamp it at the maximum count. */ if (instruction->actions.retry.mrc > 0) { + retry->count++; + if (retry->count >= instruction->actions.retry.mrc) { retry->state = FR_RETRY_MRC; @@ -312,8 +314,6 @@ unlang_frame_action_t result_calculate(request_t *request, unlang_stack_frame_t *result = RLM_MODULE_FAIL; goto finalize; } - - retry->count++; } }