]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Don't assert when unresolved lhs is allowed in map building
authorNick Porter <nick@portercomputing.co.uk>
Wed, 21 Feb 2024 14:59:45 +0000 (14:59 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 21 Feb 2024 14:59:45 +0000 (14:59 +0000)
src/lib/server/map.c

index bcf451c5a9cb755d450e75fe2c14ae50c4b8a765..a723e416a102f6cd6768d4b6ee3d7c2526dbf910 100644 (file)
@@ -728,7 +728,7 @@ check_for_child:
        }
 
        if (parent_p) {
-               if (tmpl_attr_tail_da_is_structural(map->lhs)) {
+               if (!tmpl_needs_resolving(map->lhs) && tmpl_attr_tail_da_is_structural(map->lhs)) {
                        *parent_p = map;
                } else {
                        *parent_p = parent;
@@ -738,7 +738,7 @@ check_for_child:
        /*
         *      Xlat expansions are cast to strings for structural data types.
         */
-       if (tmpl_attr_tail_da_is_structural(map->lhs) && (tmpl_is_xlat(map->rhs))) {
+       if (!tmpl_needs_resolving(map->lhs) && tmpl_attr_tail_da_is_structural(map->lhs) && (tmpl_is_xlat(map->rhs))) {
                tmpl_cast_set(map->rhs, FR_TYPE_STRING);
        }