]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print :: prefix for XLAT_BOX, too
authorAlan T. DeKok <aland@freeradius.org>
Fri, 14 Mar 2025 09:34:34 +0000 (11:34 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 14 Mar 2025 09:34:34 +0000 (11:34 +0200)
src/lib/unlang/xlat_tokenize.c

index 72dc39a38187f01b5a3857547a8b18a00ed2df06..8d83e97464b755220cb57c86d4a84351b8775f94 100644 (file)
@@ -1134,6 +1134,11 @@ ssize_t xlat_print_node(fr_sbuff_t *out, xlat_exp_head_t const *head, xlat_exp_t
                 *      @todo - respect node->quote here, too.  Which also means updating the parser.
                 */
                if (node->quote == T_BARE_WORD) {
+                       if (tmpl_require_enum_prefix && node->data.enumv &&
+                           (strncmp(node->fmt, "::", 2) == 0)) {
+                               FR_SBUFF_IN_STRCPY_LITERAL_RETURN(out, "::");
+                       }
+
                        FR_SBUFF_RETURN(fr_value_box_print, out, &node->data, e_rules);
                } else {
                        FR_SBUFF_RETURN(fr_value_box_print_quoted, out, &node->data, node->quote);