]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
increment count before checking mrc
authorAlan T. DeKok <aland@freeradius.org>
Tue, 31 Aug 2021 19:59:22 +0000 (15:59 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 31 Aug 2021 19:59:22 +0000 (15:59 -0400)
src/lib/unlang/interpret.c

index cc51ace3e4824bd318458ed1f8369511b0a951cb..4a2ba02e849db04dc539140e7637969091900611 100644 (file)
@@ -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++;
                        }
                }