]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Unknown attributes get marked up as XLAT_VIRTUAL_UNRESOLVED
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 20 Jan 2021 13:02:48 +0000 (13:02 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 20 Jan 2021 13:02:48 +0000 (13:02 +0000)
src/lib/unlang/xlat_tokenize.c

index 97e994a85bd8213eaadfdea923c9b82981580448..b37dc4b54ca5be8b2af09fe9e1ed82871e9e7b58 100644 (file)
@@ -622,7 +622,15 @@ static inline int xlat_tokenize_attribute(TALLOC_CTX *ctx, xlat_exp_t **head, xl
                        goto error;
                }
 
-               xlat_exp_set_type(node, XLAT_ATTRIBUTE);
+               /*
+                *      We don't know it's virtual but
+                *      we don't know it's not either...
+                *
+                *      Mark it up as virtual-unresolved
+                *      and let the resolution code figure
+                *      this out in a later pass.
+                */
+               xlat_exp_set_type(node, XLAT_VIRTUAL_UNRESOLVED);
                xlat_exp_set_name_buffer_shallow(node, vpt->name);
                node->attr = vpt;
                node->flags.needs_resolving = true;