From: Alan T. DeKok Date: Thu, 7 Jul 2022 14:05:58 +0000 (-0400) Subject: pass the current dictionary to xlat_resolve() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d85b9e3dd1a7802dd2fe82e4e5f9d8e91bb8e584;p=thirdparty%2Ffreeradius-server.git pass the current dictionary to xlat_resolve() --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index eeac4464808..a61dc7fadf0 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -3041,6 +3041,11 @@ static unlang_t *compile_if_subsection(unlang_t *parent, unlang_compile_t *unlan #ifdef WITH_XLAT_COND xlat_exp_head_t *head; bool is_truthy, value; + xlat_res_rules_t xr_rules = { + .tr_rules = &(tmpl_res_rules_t) { + .dict_def = unlang_ctx->rules->attr.dict_def, + }, + }; #endif if (!cf_section_name2(cs)) { @@ -3058,7 +3063,7 @@ static unlang_t *compile_if_subsection(unlang_t *parent, unlang_compile_t *unlan /* * Resolve the xlat first. */ - if (xlat_resolve(head, NULL) < 0) { + if (xlat_resolve(head, &xr_rules) < 0) { cf_log_err(cs, "Failed resolving condition - %s", fr_strerror()); return NULL; }