]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow for list_as_attr when maps are list to list
authorNick Porter <nick@portercomputing.co.uk>
Wed, 25 Jan 2023 19:28:22 +0000 (19:28 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 17:01:12 +0000 (11:01 -0600)
src/lib/server/map.c

index 8dd853cd8a1d53bb4e5c425aa137f41e161da938..e354c340cf69e84d27b9e977cde917dd5037fbf0 100644 (file)
@@ -1513,7 +1513,8 @@ int map_to_vp(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, map_t co
         *      to allocate any attributes, just finding the current list, and change
         *      the op.
         */
-       if (tmpl_is_list(map->lhs) && tmpl_is_list(map->rhs)) {
+       if ((tmpl_is_list(map->lhs) || (tmpl_contains_attr(map->lhs) && tmpl_attr_tail_da_is_structural(map->lhs))) &&
+           (tmpl_is_list(map->rhs) || (tmpl_contains_attr(map->rhs) && tmpl_attr_tail_da_is_structural(map->rhs)))) {
                fr_pair_list_t *from = NULL;
 
                if (tmpl_request_ptr(&context, tmpl_request(map->rhs)) == 0) {