From dd314f1353cbcd78bfa71abefc8d4ce325b3f2df Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Wed, 18 Jun 2025 15:22:51 -0400 Subject: [PATCH] if xlat fails, then we return fail, too revert commit 4086074515 --- src/lib/unlang/xlat_expr.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/lib/unlang/xlat_expr.c b/src/lib/unlang/xlat_expr.c index 8050538a1b..a9c70ea5e7 100644 --- a/src/lib/unlang/xlat_expr.c +++ b/src/lib/unlang/xlat_expr.c @@ -1213,6 +1213,15 @@ static xlat_action_t xlat_logical_or_resume(TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_logical_rctx_t *rctx = talloc_get_type_abort(xctx->rctx, xlat_logical_rctx_t); bool match; + /* + * If the expansions fails, then we fail the entire thing. + */ + if (!XLAT_RESULT_SUCCESS(&rctx->last_result)) { + talloc_free(rctx->box); + talloc_free(rctx); + return XLAT_ACTION_FAIL; + } + /* * Recursively check groups. i.e. we effectively flatten each list. * @@ -1308,6 +1317,15 @@ static xlat_action_t xlat_logical_and_resume(TALLOC_CTX *ctx, fr_dcursor_t *out, xlat_logical_rctx_t *rctx = talloc_get_type_abort(xctx->rctx, xlat_logical_rctx_t); bool match; + /* + * If the expansions fails, then we fail the entire thing. + */ + if (!XLAT_RESULT_SUCCESS(&rctx->last_result)) { + talloc_free(rctx->box); + talloc_free(rctx); + return XLAT_ACTION_FAIL; + } + /* * Recursively check groups. i.e. we effectively flatten each list. * -- 2.47.3