From: Alan T. DeKok Date: Wed, 20 Jul 2022 23:55:42 +0000 (-0400) Subject: just resolve any unresolved tmpls X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63633e99585a66d7c06448282040bc6404d52d91;p=thirdparty%2Ffreeradius-server.git just resolve any unresolved tmpls all of the code paths were the same, and the bare unresolved data tmpls weren't resolved. --- diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 00941b0c6f9..7f048ee625d 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -574,25 +574,9 @@ static bool pass2_fixup_map(map_t *map, tmpl_rules_t const *rules, fr_dict_attr_ } if (map->rhs) { - if (tmpl_is_xlat_unresolved(map->rhs)) { - fr_assert(tmpl_xlat(map->rhs) == NULL); + if (tmpl_is_unresolved(map->rhs)) { + fr_assert(!tmpl_is_regex_xlat_unresolved(map->rhs)); - /* - * FIXME: compile to attribute && handle - * the conversion in map_to_vp(). - */ - if (!pass2_fixup_tmpl(map, &map->rhs, map->ci, rules->attr.dict_def)) { - return false; - } - } - - fr_assert(!tmpl_is_regex_xlat_unresolved(map->rhs)); - - if (tmpl_is_attr_unresolved(map->rhs)) { - if (!pass2_fixup_tmpl(map, &map->rhs, map->ci, rules->attr.dict_def)) return false; - } - - if (tmpl_is_exec(map->rhs)) { if (!pass2_fixup_tmpl(map, &map->rhs, map->ci, rules->attr.dict_def)) { return false; }