]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
let's not go to "next" on pushed child or pushed unlang
authorAlan T. DeKok <aland@freeradius.org>
Wed, 1 Feb 2023 13:48:05 +0000 (08:48 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 1 Feb 2023 13:48:05 +0000 (08:48 -0500)
src/lib/unlang/xlat_eval.c

index dcee6e3c22ae45c4f079776f4bca558a2e4e91fb..191be276ea393a1ee19298cc2563ed899046ee12 100644 (file)
@@ -816,10 +816,8 @@ xlat_action_t xlat_frame_eval_resume(TALLOC_CTX *ctx, fr_dcursor_t *out,
                        node->call.func->name,
                        (node->call.func->input_type == XLAT_INPUT_ARGS) ? ')' : '}');
        }
-                       switch (xa) {
-       default:
-               break;
 
+       switch (xa) {
        case XLAT_ACTION_YIELD:
                RDEBUG2("| (YIELD)");
                return xa;
@@ -829,17 +827,20 @@ xlat_action_t xlat_frame_eval_resume(TALLOC_CTX *ctx, fr_dcursor_t *out,
                RDEBUG2("| --> %pV", fr_dcursor_current(out));
                if (!xlat_process_return(request, node->call.func, (FR_DLIST_HEAD(fr_value_box_list) *)out->dlist,
                                         fr_dcursor_current(out))) xa = XLAT_ACTION_FAIL;
-               break;
 
+               /*
+                *      It's easier if we get xlat_frame_eval to continue evaluating the frame.
+                */
+               *in = xlat_exp_next(head, *in); /* advance */
+               return xlat_frame_eval(ctx, out, child, request, head, in);
+
+       case XLAT_ACTION_PUSH_CHILD:
+       case XLAT_ACTION_PUSH_UNLANG:
        case XLAT_ACTION_FAIL:
-               return xa;
+               break;
        }
 
-       /*
-        *      It's easier if we get xlat_frame_eval to continue evaluating the frame.
-        */
-       *in = xlat_exp_next(head, *in); /* advance */
-       return xlat_frame_eval(ctx, out, child, request, head, in);
+       return xa;
 }
 /** Process the result of a previous nested expansion
  *