]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
We might have a cast, too
authorAlan T. DeKok <aland@freeradius.org>
Thu, 28 Aug 2014 19:05:52 +0000 (15:05 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 28 Aug 2014 19:05:52 +0000 (15:05 -0400)
src/main/modcall.c

index 93584df4a5015db6e870d06e5ad3985e4c8ce6f3..c4ffe9cf0428105e7d108f9860d57dc6df3b26ad 100644 (file)
@@ -3050,7 +3050,11 @@ check_paircmp:
                 *      forbids this.
                 */
                if (map->dst->type == TMPL_TYPE_ATTR) {
-                       if (!pass2_xlat_compile(map->ci, &map->src, true, map->dst->attribute.da)) {
+                       DICT_ATTR const *da = c->cast;
+
+                       if (!c->cast) da = map->dst->attribute.da;
+
+                       if (!pass2_xlat_compile(map->ci, &map->src, true, da)) {
                                return false;
                        }