]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Update map_to_list_mod() list to list detection
authorNick Porter <nick@portercomputing.co.uk>
Fri, 27 Jan 2023 11:05:47 +0000 (11:05 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 17:00:07 +0000 (11:00 -0600)
Will handle any structural to structural copy

src/lib/server/map_async.c

index 5e369107a585544d0db4e46f67aa72f142e22054..a3cf66e3aa466a8bea7448f7290f4dd0d4da2b91 100644 (file)
@@ -362,7 +362,8 @@ int map_to_list_mod(TALLOC_CTX *ctx, vp_list_mod_t **out,
        /*
         *      List to list copy.
         */
-       if (tmpl_is_list(mutated->lhs) && tmpl_is_list(mutated->rhs)) {
+       if (tmpl_is_attr(mutated->lhs) && tmpl_is_attr(mutated->rhs) &&
+           tmpl_attr_tail_da_is_structural(mutated->lhs) && tmpl_attr_tail_da_is_structural(mutated->rhs)) {
                fr_pair_list_t  *list = NULL;
                fr_pair_t       *vp = NULL;