]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
handle list_as_attr when resolving virtual attributes
authorAlan T. DeKok <aland@freeradius.org>
Wed, 27 Jul 2022 12:51:37 +0000 (08:51 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 27 Jul 2022 14:34:59 +0000 (10:34 -0400)
src/lib/unlang/xlat_tokenize.c

index 082ce4d3a3355dd4c54dc65a1030486ead5a0f8e..8f9fd85989900b91c8ad264a49e56ee98014f530 100644 (file)
@@ -693,7 +693,7 @@ static inline int xlat_tokenize_attribute(xlat_exp_head_t *head, fr_sbuff_t *in,
                /*
                 *      Could it be a virtual attribute?
                 */
-               if ((tmpl_attr_count(vpt) == 1) && (xlat_resolve_virtual_attribute(node, vpt) == 0)) goto done;
+               if ((tmpl_attr_count(vpt) == (1 + vpt->rules.attr.list_as_attr)) && (xlat_resolve_virtual_attribute(node, vpt) == 0)) goto done;
 
                if (!t_rules || !t_rules->attr.allow_unresolved) {
                        talloc_free(vpt);