From d2a69c69806e2a85f175aecf0bfdea2bcb094839 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Mon, 21 Jul 2025 08:02:54 -0700 Subject: [PATCH] tmpl_push should take an argument saying whether it's a top frame --- src/lib/server/trigger.c | 26 +---------------------- src/lib/unlang/call_env.c | 2 +- src/lib/unlang/edit.c | 2 +- src/lib/unlang/limit.c | 2 +- src/lib/unlang/map.c | 6 +++--- src/lib/unlang/module.c | 2 +- src/lib/unlang/timeout.c | 2 +- src/lib/unlang/tmpl.c | 5 +++-- src/lib/unlang/tmpl.h | 2 +- src/lib/unlang/xlat_eval.c | 2 +- src/modules/rlm_ldap/groups.c | 4 ++-- src/modules/rlm_ldap/rlm_ldap.c | 4 ++-- src/modules/rlm_mschap/rlm_mschap.c | 6 +++--- src/modules/rlm_sql/rlm_sql.c | 18 ++++++++-------- src/modules/rlm_sqlippool/rlm_sqlippool.c | 10 ++++----- 15 files changed, 35 insertions(+), 58 deletions(-) diff --git a/src/lib/server/trigger.c b/src/lib/server/trigger.c index c6c0d887ae..811aa857ed 100644 --- a/src/lib/server/trigger.c +++ b/src/lib/server/trigger.c @@ -103,15 +103,6 @@ typedef struct { int exec_status; //!< Result of the program (if the trigger is a tmpl) } fr_trigger_t; -/* - * Function to call when popping the frame - */ -static unlang_action_t trigger_pop(UNUSED unlang_result_t *p_result, UNUSED request_t *request, UNUSED void *uctx) -{ - return UNLANG_ACTION_CALCULATE_RESULT; -} - - /** Execute a trigger - call an executable to process an event * * A trigger ties a state change (e.g. connection up) in a module to an action @@ -165,8 +156,6 @@ int trigger(unlang_interpret_t *intp, fr_event_list_t *el; tmpl_rules_t t_rules; - unlang_action_t action; - /* * noop if trigger_init was never called, or if * we're just checking the configuration. @@ -334,19 +323,6 @@ int trigger(unlang_interpret_t *intp, fr_assert(trigger->vpt != NULL); - action = unlang_function_push_with_result(unlang_interpret_result(request), /* transparent */ - request, - NULL, /* don't call it immediately */ - trigger_pop, /* but when we pop the frame */ - NULL, ~(FR_SIGNAL_CANCEL), - UNLANG_TOP_FRAME, - NULL); - if (action != UNLANG_ACTION_PUSHED_CHILD) { - ERROR("Failed initializing the trigger"); - talloc_free(request); - return -1; - } - if (unlang_tmpl_push(trigger, &trigger->result, &trigger->out, request, trigger->vpt, &(unlang_tmpl_args_t) { .type = UNLANG_TMPL_ARGS_TYPE_EXEC, @@ -354,7 +330,7 @@ int trigger(unlang_interpret_t *intp, .status_out = &trigger->exec_status, .timeout = fr_time_delta_from_sec(5), }, - }) < 0) { + }, UNLANG_TOP_FRAME) < 0) { talloc_free(request); } diff --git a/src/lib/unlang/call_env.c b/src/lib/unlang/call_env.c index 80f50e5b56..57faf3db5d 100644 --- a/src/lib/unlang/call_env.c +++ b/src/lib/unlang/call_env.c @@ -258,7 +258,7 @@ again: if (unlang_tmpl_push(ctx, &call_env_rctx->expansion_result, &call_env_rctx->tmpl_expanded, request, call_env_rctx->last_expanded->data.tmpl, - NULL) < 0) return UNLANG_ACTION_FAIL; + NULL, UNLANG_SUB_FRAME) < 0) return UNLANG_ACTION_FAIL; return UNLANG_ACTION_PUSHED_CHILD; } diff --git a/src/lib/unlang/edit.c b/src/lib/unlang/edit.c index 95f213b03c..34a6c47a9b 100644 --- a/src/lib/unlang/edit.c +++ b/src/lib/unlang/edit.c @@ -162,7 +162,7 @@ static int tmpl_to_values(TALLOC_CTX *ctx, edit_result_t *out, request_t *reques return 0; case TMPL_TYPE_EXEC: - if (unlang_tmpl_push(ctx, &out->result, &out->list, request, vpt, NULL) < 0) return -1; + if (unlang_tmpl_push(ctx, &out->result, &out->list, request, vpt, NULL, UNLANG_SUB_FRAME) < 0) return -1; return 1; case TMPL_TYPE_XLAT: diff --git a/src/lib/unlang/limit.c b/src/lib/unlang/limit.c index e20ee88e24..3de943b9da 100644 --- a/src/lib/unlang/limit.c +++ b/src/lib/unlang/limit.c @@ -115,7 +115,7 @@ static unlang_action_t unlang_limit(unlang_result_t *p_result, request_t *reques fr_value_box_list_init(&state->result); - if (unlang_tmpl_push(state, NULL, &state->result, request, gext->vpt, NULL) < 0) return UNLANG_ACTION_FAIL; + if (unlang_tmpl_push(state, NULL, &state->result, request, gext->vpt, NULL, UNLANG_SUB_FRAME) < 0) return UNLANG_ACTION_FAIL; frame_repeat(frame, unlang_limit_xlat_done); diff --git a/src/lib/unlang/map.c b/src/lib/unlang/map.c index 5b298157a1..72adf8e442 100644 --- a/src/lib/unlang/map.c +++ b/src/lib/unlang/map.c @@ -159,7 +159,7 @@ static unlang_action_t list_mod_create(unlang_result_t *p_result, request_t *req case TMPL_TYPE_EXEC: if (unlang_tmpl_push(update_state, NULL, &update_state->lhs_result, request, map->lhs, - NULL) < 0) { + NULL, UNLANG_SUB_FRAME) < 0) { return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -198,7 +198,7 @@ static unlang_action_t list_mod_create(unlang_result_t *p_result, request_t *req case TMPL_TYPE_EXEC: if (unlang_tmpl_push(update_state, NULL, &update_state->rhs_result, - request, map->rhs, NULL) < 0) { + request, map->rhs, NULL, UNLANG_SUB_FRAME) < 0) { return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; @@ -419,7 +419,7 @@ static unlang_action_t unlang_map_state_init(unlang_result_t *p_result, request_ } case TMPL_TYPE_EXEC: if (unlang_tmpl_push(map_proc_state, NULL, &map_proc_state->src_result, - request, inst->src, NULL) < 0) { + request, inst->src, NULL, UNLANG_SUB_FRAME) < 0) { return UNLANG_ACTION_STOP_PROCESSING; } return UNLANG_ACTION_PUSHED_CHILD; diff --git a/src/lib/unlang/module.c b/src/lib/unlang/module.c index 2cf5869044..46fd9bdbe0 100644 --- a/src/lib/unlang/module.c +++ b/src/lib/unlang/module.c @@ -227,7 +227,7 @@ unlang_action_t unlang_module_yield_to_tmpl(TALLOC_CTX *ctx, fr_value_box_list_t /* * Push the xlat function */ - if (unlang_tmpl_push(ctx, NULL, out, request, vpt, args) < 0) return UNLANG_ACTION_FAIL; + if (unlang_tmpl_push(ctx, NULL, out, request, vpt, args, UNLANG_SUB_FRAME) < 0) return UNLANG_ACTION_FAIL; return UNLANG_ACTION_PUSHED_CHILD; } diff --git a/src/lib/unlang/timeout.c b/src/lib/unlang/timeout.c index 2a85cb4636..e76fa03bdb 100644 --- a/src/lib/unlang/timeout.c +++ b/src/lib/unlang/timeout.c @@ -175,7 +175,7 @@ static unlang_action_t unlang_timeout(unlang_result_t *p_result, request_t *requ fr_value_box_list_init(&state->result); - if (unlang_tmpl_push(state, NULL, &state->result, request, gext->vpt, NULL) < 0) return UNLANG_ACTION_FAIL; + if (unlang_tmpl_push(state, NULL, &state->result, request, gext->vpt, NULL, UNLANG_SUB_FRAME) < 0) return UNLANG_ACTION_FAIL; frame_repeat(frame, unlang_timeout_done); diff --git a/src/lib/unlang/tmpl.c b/src/lib/unlang/tmpl.c index 0a640b710a..02a24f8d8e 100644 --- a/src/lib/unlang/tmpl.c +++ b/src/lib/unlang/tmpl.c @@ -268,12 +268,13 @@ push: * @param[in] tmpl the tmpl to expand * @param[in] args additional controls for expanding #TMPL_TYPE_EXEC, * and where the status of exited programs will be stored. + * @param[in] top_frame If true, then this is the top frame of the sub-stack. * @return * - 0 on success * - -1 on failure */ int unlang_tmpl_push(TALLOC_CTX *ctx, unlang_result_t *p_result, fr_value_box_list_t *out, request_t *request, - tmpl_t const *tmpl, unlang_tmpl_args_t *args) + tmpl_t const *tmpl, unlang_tmpl_args_t *args, bool top_frame) { unlang_stack_t *stack = request->stack; unlang_stack_frame_t *frame; @@ -320,7 +321,7 @@ int unlang_tmpl_push(TALLOC_CTX *ctx, unlang_result_t *p_result, fr_value_box_li * Push a new tmpl frame onto the stack */ if (unlang_interpret_push(p_result, request, unlang_tmpl_to_generic(ut), - FRAME_CONF(RLM_MODULE_NOT_SET, false), UNLANG_NEXT_STOP) < 0) return -1; + FRAME_CONF(RLM_MODULE_NOT_SET, top_frame), UNLANG_NEXT_STOP) < 0) return -1; frame = &stack->frame[stack->depth]; state = talloc_get_type_abort(frame->state, unlang_frame_state_tmpl_t); diff --git a/src/lib/unlang/tmpl.h b/src/lib/unlang/tmpl.h index 5ba222c720..9eaa3e984b 100644 --- a/src/lib/unlang/tmpl.h +++ b/src/lib/unlang/tmpl.h @@ -109,7 +109,7 @@ typedef void (*fr_unlang_tmpl_signal_t)(request_t *request, void *rctx, fr_signa typedef unlang_action_t (*fr_unlang_tmpl_resume_t)(unlang_result_t *p_result, request_t *request, void *rctx); int unlang_tmpl_push(TALLOC_CTX *ctx, unlang_result_t *p_result, fr_value_box_list_t *out, - request_t *request, tmpl_t const *tmpl, unlang_tmpl_args_t *args) + request_t *request, tmpl_t const *tmpl, unlang_tmpl_args_t *args, bool top_frame) CC_HINT(warn_unused_result); #ifdef __cplusplus diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index 1231ad1b11..5a2d93bff8 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -1455,7 +1455,7 @@ xlat_action_t xlat_frame_eval(TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_exp_head_ if (unlang_tmpl_push(ctx, NULL, &rctx->list, request, node->vpt, TMPL_ARGS_EXEC(NULL, fr_time_delta_from_sec(EXEC_TIMEOUT), - false, &rctx->status)) < 0) goto fail; + false, &rctx->status), UNLANG_SUB_FRAME) < 0) goto fail; xa = XLAT_ACTION_PUSH_UNLANG; goto finish; diff --git a/src/modules/rlm_ldap/groups.c b/src/modules/rlm_ldap/groups.c index a3050a5d69..1e10053d50 100644 --- a/src/modules/rlm_ldap/groups.c +++ b/src/modules/rlm_ldap/groups.c @@ -728,7 +728,7 @@ unlang_action_t rlm_ldap_cacheable_groupobj(unlang_result_t *p_result, request_t RETURN_UNLANG_FAIL; } - if (unlang_tmpl_push(group_ctx, NULL, &group_ctx->expanded_filter, request, autz_ctx->call_env->group_filter, NULL) < 0) goto error; + if (unlang_tmpl_push(group_ctx, NULL, &group_ctx->expanded_filter, request, autz_ctx->call_env->group_filter, NULL, UNLANG_SUB_FRAME) < 0) goto error; return UNLANG_ACTION_PUSHED_CHILD; } @@ -855,7 +855,7 @@ unlang_action_t rlm_ldap_check_groupobj_dynamic(unlang_result_t *p_result, reque RETURN_UNLANG_FAIL; } - if (unlang_tmpl_push(group_ctx, NULL, &group_ctx->expanded_filter, request, group_ctx->filter_tmpl, NULL) < 0) goto error; + if (unlang_tmpl_push(group_ctx, NULL, &group_ctx->expanded_filter, request, group_ctx->filter_tmpl, NULL, UNLANG_SUB_FRAME) < 0) goto error; return UNLANG_ACTION_PUSHED_CHILD; } diff --git a/src/modules/rlm_ldap/rlm_ldap.c b/src/modules/rlm_ldap/rlm_ldap.c index bbfd2d1a4e..55c849b060 100644 --- a/src/modules/rlm_ldap/rlm_ldap.c +++ b/src/modules/rlm_ldap/rlm_ldap.c @@ -2173,7 +2173,7 @@ next: if (usermod_ctx->current_mod < usermod_ctx->num_mods) { if (unlang_module_yield(request, user_modify_mod_build_resume, NULL, 0, usermod_ctx) == UNLANG_ACTION_FAIL) RETURN_UNLANG_FAIL; if (unlang_tmpl_push(usermod_ctx, NULL, &usermod_ctx->expanded, request, - usermod_ctx->call_env->mod[usermod_ctx->current_mod]->tmpl, NULL) < 0) RETURN_UNLANG_FAIL; + usermod_ctx->call_env->mod[usermod_ctx->current_mod]->tmpl, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; return UNLANG_ACTION_PUSHED_CHILD; } @@ -2214,7 +2214,7 @@ static unlang_action_t CC_HINT(nonnull) user_modify_resume(unlang_result_t *p_re if (unlang_module_yield(request, user_modify_mod_build_resume, NULL, 0, usermod_ctx) == UNLANG_ACTION_FAIL) goto fail; ; if (unlang_tmpl_push(usermod_ctx, NULL, &usermod_ctx->expanded, request, - usermod_ctx->call_env->mod[0]->tmpl, NULL) < 0) goto fail; + usermod_ctx->call_env->mod[0]->tmpl, NULL, UNLANG_SUB_FRAME) < 0) goto fail; return UNLANG_ACTION_PUSHED_CHILD; } diff --git a/src/modules/rlm_mschap/rlm_mschap.c b/src/modules/rlm_mschap/rlm_mschap.c index 825c81fb20..e536ff56c6 100644 --- a/src/modules/rlm_mschap/rlm_mschap.c +++ b/src/modules/rlm_mschap/rlm_mschap.c @@ -2311,7 +2311,7 @@ static unlang_action_t CC_HINT(nonnull) mod_authenticate(unlang_result_t *p_resu fr_value_box_list_init(&auth_ctx->cpw_ctx->local_cpw_result); if (unlang_tmpl_push(auth_ctx, NULL, &auth_ctx->cpw_ctx->local_cpw_result, request, - env_data->local_cpw, NULL) < 0) RETURN_UNLANG_FAIL; + env_data->local_cpw, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; break; #else REDEBUG("Local MS-CHAPv2 password changes require OpenSSL support"); @@ -2337,7 +2337,7 @@ static unlang_action_t CC_HINT(nonnull) mod_authenticate(unlang_result_t *p_resu if (env_data->ntlm_cpw_domain) { fr_value_box_list_init(&auth_ctx->cpw_ctx->cpw_domain); if (unlang_tmpl_push(auth_ctx, NULL, &auth_ctx->cpw_ctx->cpw_domain, request, - env_data->ntlm_cpw_domain, NULL) < 0) RETURN_UNLANG_FAIL; + env_data->ntlm_cpw_domain, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; } fr_value_box_list_init(&auth_ctx->cpw_ctx->cpw_user); @@ -2346,7 +2346,7 @@ static unlang_action_t CC_HINT(nonnull) mod_authenticate(unlang_result_t *p_resu * b) Expanding the username */ if (unlang_tmpl_push(auth_ctx, NULL, &auth_ctx->cpw_ctx->cpw_user, request, - env_data->ntlm_cpw_username, NULL) < 0) RETURN_UNLANG_FAIL; + env_data->ntlm_cpw_username, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; break; } diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index 91887bf8db..b16670521b 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -1221,7 +1221,7 @@ static xlat_action_t sql_group_xlat(UNUSED TALLOC_CTX *ctx, UNUSED fr_dcursor_t fr_value_box_list_init(&xlat_ctx->query); if (unlang_xlat_yield(request, sql_group_xlat_resume, NULL, 0, xlat_ctx) != XLAT_ACTION_YIELD) return XLAT_ACTION_FAIL; - if (unlang_tmpl_push(xlat_ctx, NULL, &xlat_ctx->query, request, call_env->membership_query, NULL) < 0) return XLAT_ACTION_FAIL; + if (unlang_tmpl_push(xlat_ctx, NULL, &xlat_ctx->query, request, call_env->membership_query, NULL, UNLANG_SUB_FRAME) < 0) return XLAT_ACTION_FAIL; return XLAT_ACTION_PUSH_UNLANG; } @@ -1374,7 +1374,7 @@ static unlang_action_t CC_HINT(nonnull) mod_autz_group_resume(unlang_result_t * if (call_env->group_check_query) { if (unlang_module_yield(request, mod_autz_group_resume, NULL, 0, mctx->rctx) == UNLANG_ACTION_FAIL) RETURN_UNLANG_FAIL; if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, - call_env->group_check_query, NULL) < 0) RETURN_UNLANG_FAIL; + call_env->group_check_query, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; return UNLANG_ACTION_PUSHED_CHILD; } @@ -1429,7 +1429,7 @@ static unlang_action_t CC_HINT(nonnull) mod_autz_group_resume(unlang_result_t * group_reply_push: if (unlang_module_yield(request, mod_autz_group_resume, NULL, 0, mctx->rctx) == UNLANG_ACTION_FAIL) RETURN_UNLANG_FAIL; if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, - call_env->group_reply_query, NULL) < 0) RETURN_UNLANG_FAIL; + call_env->group_reply_query, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; autz_ctx->status = autz_ctx->status & SQL_AUTZ_STAGE_GROUP ? SQL_AUTZ_GROUP_REPLY : SQL_AUTZ_PROFILE_REPLY; return UNLANG_ACTION_PUSHED_CHILD; } @@ -1593,7 +1593,7 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize_resume(unlang_result_t *p_ if (!call_env->reply_query) goto skip_reply; if (unlang_module_yield(request, mod_authorize_resume, NULL, 0, autz_ctx) == UNLANG_ACTION_FAIL) RETURN_UNLANG_FAIL; - if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->reply_query, NULL) < 0) RETURN_UNLANG_FAIL; + if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->reply_query, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; autz_ctx->status = SQL_AUTZ_REPLY; return UNLANG_ACTION_PUSHED_CHILD; @@ -1657,7 +1657,7 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize_resume(unlang_result_t *p_ if (unlang_module_yield(request, mod_autz_group_resume, NULL, 0, autz_ctx) == UNLANG_ACTION_FAIL) RETURN_UNLANG_FAIL; if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, - call_env->membership_query, NULL) < 0) RETURN_UNLANG_FAIL; + call_env->membership_query, NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; autz_ctx->status = SQL_AUTZ_GROUP_MEMB; return UNLANG_ACTION_PUSHED_CHILD; } @@ -1739,13 +1739,13 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize(unlang_result_t *p_result, * Query the check table to find any conditions associated with this user/realm/whatever... */ if (call_env->check_query) { - if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->check_query, NULL) < 0) goto error; + if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->check_query, NULL, UNLANG_SUB_FRAME) < 0) goto error; autz_ctx->status = SQL_AUTZ_CHECK; return UNLANG_ACTION_PUSHED_CHILD; } if (call_env->reply_query) { - if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->reply_query, NULL) < 0) goto error; + if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->reply_query, NULL, UNLANG_SUB_FRAME) < 0) goto error; autz_ctx->status = SQL_AUTZ_REPLY; return UNLANG_ACTION_PUSHED_CHILD; } @@ -1753,7 +1753,7 @@ static unlang_action_t CC_HINT(nonnull) mod_authorize(unlang_result_t *p_result, /* * Neither check nor reply queries were set, so we must be doing group stuff */ - if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->membership_query, NULL) < 0) goto error; + if (unlang_tmpl_push(autz_ctx, NULL, &autz_ctx->query, request, call_env->membership_query, NULL, UNLANG_SUB_FRAME) < 0) goto error; autz_ctx->status = SQL_AUTZ_GROUP_MEMB; return UNLANG_ACTION_PUSHED_CHILD; } @@ -1850,7 +1850,7 @@ next: redundant_ctx->query_no++; if (redundant_ctx->query_no >= talloc_array_length(call_env->query)) RETURN_UNLANG_NOOP; if (unlang_module_yield(request, mod_sql_redundant_resume, NULL, 0, redundant_ctx) == UNLANG_ACTION_FAIL) RETURN_UNLANG_FAIL; - if (unlang_tmpl_push(redundant_ctx, NULL, &redundant_ctx->query, request, call_env->query[redundant_ctx->query_no], NULL) < 0) RETURN_UNLANG_FAIL; + if (unlang_tmpl_push(redundant_ctx, NULL, &redundant_ctx->query, request, call_env->query[redundant_ctx->query_no], NULL, UNLANG_SUB_FRAME) < 0) RETURN_UNLANG_FAIL; RDEBUG2("Trying next query..."); diff --git a/src/modules/rlm_sqlippool/rlm_sqlippool.c b/src/modules/rlm_sqlippool/rlm_sqlippool.c index bbbca456aa..4f31484ad2 100644 --- a/src/modules/rlm_sqlippool/rlm_sqlippool.c +++ b/src/modules/rlm_sqlippool/rlm_sqlippool.c @@ -283,7 +283,7 @@ static unlang_action_t mod_alloc_resume(unlang_result_t *p_result, module_ctx_t if (env->existing) { alloc_ctx->status = IPPOOL_ALLOC_EXISTING; REPEAT_MOD_ALLOC_RESUME; - if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->existing, NULL) < 0) { + if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->existing, NULL, UNLANG_SUB_FRAME) < 0) { error: talloc_free(alloc_ctx); RETURN_UNLANG_FAIL; @@ -310,7 +310,7 @@ static unlang_action_t mod_alloc_resume(unlang_result_t *p_result, module_ctx_t if (env->requested && (env->requested_address.type != FR_TYPE_NULL)) { alloc_ctx->status = IPPOOL_ALLOC_REQUESTED; REPEAT_MOD_ALLOC_RESUME; - if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->requested, NULL) < 0) goto error; + if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->requested, NULL, UNLANG_SUB_FRAME) < 0) goto error; return UNLANG_ACTION_PUSHED_CHILD; } goto expand_find; @@ -333,7 +333,7 @@ static unlang_action_t mod_alloc_resume(unlang_result_t *p_result, module_ctx_t */ alloc_ctx->status = IPPOOL_ALLOC_FIND; REPEAT_MOD_ALLOC_RESUME; - if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->find, NULL) < 0) goto error; + if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->find, NULL, UNLANG_SUB_FRAME) < 0) goto error; return UNLANG_ACTION_PUSHED_CHILD; case IPPOOL_ALLOC_FIND: @@ -364,7 +364,7 @@ static unlang_action_t mod_alloc_resume(unlang_result_t *p_result, module_ctx_t if (env->pool_check) { alloc_ctx->status = IPPOOL_ALLOC_POOL_CHECK; REPEAT_MOD_ALLOC_RESUME; - if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->pool_check, NULL) < 0) goto error; + if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->pool_check, NULL, UNLANG_SUB_FRAME) < 0) goto error; return UNLANG_ACTION_PUSHED_CHILD; } no_address: @@ -405,7 +405,7 @@ static unlang_action_t mod_alloc_resume(unlang_result_t *p_result, module_ctx_t if (env->update) { alloc_ctx->status = IPPOOL_ALLOC_UPDATE; REPEAT_MOD_ALLOC_RESUME; - if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->update, NULL) < 0) goto error; + if (unlang_tmpl_push(alloc_ctx, NULL, &alloc_ctx->values, request, env->update, NULL, UNLANG_SUB_FRAME) < 0) goto error; return UNLANG_ACTION_PUSHED_CHILD; } -- 2.47.2