{
xlat_logical_inst_t const *inst = talloc_get_type_abort_const(xctx->inst, xlat_logical_inst_t);
xlat_logical_rctx_t *rctx = talloc_get_type_abort(xctx->rctx, xlat_logical_rctx_t);
+ bool match;
/*
* If one of the expansions fails, then we fail the
*
* (a, b, c) || (d, e, f) == a || b || c || d || e || f
*/
- if (!xlat_logical_match(&rctx->box, &rctx->list, inst->stop_on_match)) {
+ match = xlat_logical_match(&rctx->box, &rctx->list, inst->stop_on_match);
+ if (!match) {
/*
* If nothing matches, we return a "false" box.
*/
}
fr_value_box_list_talloc_free(&rctx->list);
+
+ /*
+ * If we stop on the first match, and we got a "true" match we're done.
+ */
+ if (inst->stop_on_match && match && fr_value_box_is_truthy(rctx->box)) goto done;
+
rctx->current++;
/*