]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only check for cast if lhs is a leaf da
authorNick Porter <nick@portercomputing.co.uk>
Wed, 25 Jan 2023 19:29:16 +0000 (19:29 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 9 Feb 2023 17:01:14 +0000 (11:01 -0600)
src/lib/server/map.c

index e354c340cf69e84d27b9e977cde917dd5037fbf0..652b0ca00c6ea2c9266b8c2691792927f0789f98 100644 (file)
@@ -1611,7 +1611,7 @@ int map_to_vp(TALLOC_CTX *ctx, fr_pair_list_t *out, request_t *request, map_t co
                 *  Src/Dst attributes don't match, convert src attributes
                 *  to match dst.
                 */
-               if (tmpl_is_attr(map->lhs) &&
+               if (tmpl_is_attr(map->lhs) && tmpl_attr_tail_da_is_leaf(map->lhs) &&
                    (tmpl_attr_tail_da(map->rhs)->type != tmpl_attr_tail_da(map->lhs)->type)) {
                        for (; vp; vp = fr_dcursor_current(&from)) {
                                MEM(n = fr_pair_afrom_da(ctx, tmpl_attr_tail_da(map->lhs)));