]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert to real dictionary if that's where the attribute is found
authorNick Porter <nick@portercomputing.co.uk>
Thu, 5 Oct 2023 18:33:58 +0000 (19:33 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 5 Oct 2023 18:33:58 +0000 (19:33 +0100)
src/lib/server/tmpl_tokenize.c

index 7ec5bd8c96918923c7dafdc05a05bdcc478f252e..68bea073c0506cc415da57d6ace881c8b9851646 100644 (file)
@@ -1734,6 +1734,12 @@ static inline int tmpl_attr_afrom_attr_substr(TALLOC_CTX *ctx, tmpl_attr_error_t
                        ar = NULL;
 
                } else {
+                       /*
+                        *      If we searched in a local dictionary, but found a real attribute
+                        *      switch the namespace.
+                        */
+                       if (!da->flags.local && namespace->flags.local) namespace = our_parent = fr_dict_root(da->dict);
+
                        /*
                         *      We had an alias in the same namespace,
                         *      go add more things in.