]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
set_leaf_da() should also set leaf filter
authorAlan T. DeKok <aland@freeradius.org>
Mon, 2 Sep 2024 11:08:26 +0000 (07:08 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 2 Sep 2024 11:08:26 +0000 (07:08 -0400)
src/lib/server/map.c
src/lib/server/tmpl_tokenize.c

index 7842d6b9dca390b35ba430c2fdb89466d56c26e5..7d9c49a868a34a5de1cfd267e1bfecc533d1f3ba 100644 (file)
@@ -1368,7 +1368,6 @@ int map_afrom_vp(TALLOC_CTX *ctx, map_t **out, fr_pair_t *vp, tmpl_rules_t const
        if (!map->lhs) goto oom;
 
        tmpl_attr_set_leaf_da(map->lhs, vp->da);
-       tmpl_attr_set_leaf_num(map->lhs, NUM_UNSPEC);
 
        tmpl_attr_set_request_ref(map->lhs, rules->attr.request_def);
        tmpl_attr_set_list(map->lhs, rules->attr.list_def);
index dfe6d48677cd3dbd30f2494392ab3da0d6b5fcaf..cf6805f1a0b21a7c4d15718733c987e78882933c 100644 (file)
@@ -1158,10 +1158,13 @@ int tmpl_attr_set_leaf_da(tmpl_t *vpt, fr_dict_attr_t const *da)
                ref->type = TMPL_ATTR_TYPE_NORMAL;
                ref->da = da;
        }
+
        /*
         *      FIXME - Should be calculated from existing ar
         */
        ref->ar_parent = fr_dict_root(fr_dict_by_da(da));       /* Parent is the root of the dictionary */
+       ref->ar_filter_type = TMPL_ATTR_FILTER_TYPE_NONE;
+       ref->ar_num = NUM_UNSPEC;
 
        TMPL_ATTR_VERIFY(vpt);