]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
pass the current dictionary to xlat_resolve()
authorAlan T. DeKok <aland@freeradius.org>
Thu, 7 Jul 2022 14:05:58 +0000 (10:05 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 7 Jul 2022 14:05:58 +0000 (10:05 -0400)
src/lib/unlang/compile.c

index eeac446480865f033fd6db9a7c53966e1c5e086f..a61dc7fadf0833b91bffd3fdccca803fe6f52cd3 100644 (file)
@@ -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;
        }