* the appropriate place.
*/
if (current->temporary_pair_list) {
- fr_dict_attr_t const *da = tmpl_attr_tail_da(current->lhs.vpt);
fr_pair_list_t *list = ¤t->parent->rhs.pair_list;
+ fr_pair_t *vp;
while (box) {
- fr_pair_t *vp;
+ /*
+ * Create (or find) all intermediate attributes. The LHS map might have multiple
+ * attribute names in it.
+ *
+ * @todo - audit other uses of tmpl_attr_tail_da() and fr_pair_afrom_da() in this file.
+ */
+ if (pair_append_by_tmpl_parent(current->parent->lhs.vp, &vp, list, current->lhs.vpt, true) < 0) {
+ RWDEBUG("Failed creating attribute %s", current->lhs.vpt->name);
+ return -1;
+ }
- MEM(vp = fr_pair_afrom_da(current->parent->lhs.vp, da));
vp->op = map->op;
if (fr_value_box_cast(vp, &vp->data, vp->da->type, vp->da, box) < 0) return -1;
- if (fr_pair_append(list, vp) < 0) return -1;
-
-// RDEBUG2("%s %s %pV", current->lhs.vpt->name, fr_tokens[map->op], &vp->data);
if (single) break;
KEYWORD_UPDATE_REWRITE_TESTS := update-all update-array update-delete update-remove-any update-group update-hex update-remove-value update-index update-list-error update-remove-list update-prepend unknown-update update-error update-error-2 update-exec-error update-list-null-rhs update-exec
# Tests which can use new conditions, but which can't use tmpl_tokenize_all_nested=yes
-KEYWORD_UPDATE_TMPL_TESTS := foreach-regex mschap pairs xlat-dhcpv4
+KEYWORD_UPDATE_TMPL_TESTS := foreach-regex pairs xlat-dhcpv4
#
# Migration support. Some of the tests don't run under the new