From: Arran Cudbard-Bell Date: Wed, 7 May 2025 00:43:18 +0000 (-0600) Subject: Set the initial frame action correctly for resumed requests X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d5a09dd230d7d4de4e8c54d5cb99c6a5cff1bc;p=thirdparty%2Ffreeradius-server.git Set the initial frame action correctly for resumed requests --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index e7550361230..60ee2588469 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -711,7 +711,6 @@ unlang_frame_action_t frame_eval(request_t *request, unlang_stack_frame_t *frame */ CC_HINT(hot) rlm_rcode_t unlang_interpret(request_t *request, bool running) { - unlang_frame_action_t fa = UNLANG_FRAME_ACTION_NEXT; rlm_rcode_t rcode; /* @@ -721,6 +720,14 @@ CC_HINT(hot) rlm_rcode_t unlang_interpret(request_t *request, bool running) unlang_interpret_t *intp = stack->intp; unlang_stack_frame_t *frame = &stack->frame[stack->depth]; /* Quiet static analysis */ + /* + * This is needed to ensure that if a frame is marked + * for unwinding whilst the request is yielded, we + * unwind the cancelled frame correctly, instead of + * continuing. + */ + unlang_frame_action_t fa = is_unwinding(frame) ? UNLANG_FRAME_ACTION_POP : UNLANG_FRAME_ACTION_NEXT; + stack->priority = -1; /* Reset */ #ifndef NDEBUG