Skip to content

Commit

Permalink
hoist the attr ref fixups to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 4, 2023
1 parent b14cf2a commit bb341c9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/lib/server/tmpl_tokenize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,6 +1732,16 @@ static inline int tmpl_attr_afrom_attr_substr(TALLOC_CTX *ctx, tmpl_attr_error_t
}
}
ar = NULL;

} else {
/*
* We had an alias in the same namespace,
* go add more things in.
*/
if (da->parent != our_parent) {
fr_assert(namespace == our_parent);
tmpl_attr_ref_fixup(ctx, vpt, da->parent, our_parent);
}
}
}

Expand All @@ -1756,11 +1766,6 @@ static inline int tmpl_attr_afrom_attr_substr(TALLOC_CTX *ctx, tmpl_attr_error_t
* reference.
*/
fr_assert(our_parent != NULL);

if (da->parent != our_parent) {
tmpl_attr_ref_fixup(ctx, vpt, da->parent, our_parent);
}

goto alloc_ar;
}

Expand Down

0 comments on commit bb341c9

Please sign in to comment.