From: Alan T. DeKok Date: Wed, 4 Oct 2023 15:15:35 +0000 (-0400) Subject: hoist the attr ref fixups to be more specific X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb341c9464d5ee7ae3be544e51db0852fca4cdee;p=thirdparty%2Ffreeradius-server.git hoist the attr ref fixups to be more specific --- diff --git a/src/lib/server/tmpl_tokenize.c b/src/lib/server/tmpl_tokenize.c index 3f9c851393..7ec5bd8c96 100644 --- a/src/lib/server/tmpl_tokenize.c +++ b/src/lib/server/tmpl_tokenize.c @@ -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); + } } } @@ -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; }