]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
List tmpls should not be NUM_ALL
authorNick Porter <nick@portercomputing.co.uk>
Thu, 26 Jan 2023 17:15:29 +0000 (17:15 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 18:40:37 +0000 (12:40 -0600)
There is only ever one instance of each list pair.

src/lib/unlang/compile.c

index 277c36d41516cc0efde520d5d1f8430d74f5656c..6589ea6628698855dadb07f2724b7d77e8bf2122 100644 (file)
@@ -852,7 +852,7 @@ int unlang_fixup_update(map_t *map, void *ctx)
        if (!ctx) {
                switch (map->lhs->type) {
                case TMPL_TYPE_ATTR:
-                       tmpl_attr_rewrite_leaf_num(map->lhs, NUM_UNSPEC, NUM_ALL);
+                       if (!tmpl_is_list(map->lhs)) tmpl_attr_rewrite_leaf_num(map->lhs, NUM_UNSPEC, NUM_ALL);
                        break;
 
                default:
@@ -864,7 +864,7 @@ int unlang_fixup_update(map_t *map, void *ctx)
                 */
                switch (map->rhs->type) {
                case TMPL_TYPE_ATTR:
-                       tmpl_attr_rewrite_leaf_num(map->rhs, NUM_UNSPEC, NUM_ALL);
+                       if (!tmpl_is_list(map->rhs)) tmpl_attr_rewrite_leaf_num(map->rhs, NUM_UNSPEC, NUM_ALL);
                        break;
 
                default: