RETURN_OK(snprintf(data, COMMAND_OUTPUT_MAX, "%ld", size));
}
-extern bool tmpl_require_enum_prefix;
extern bool xlat_func_bare_words;
/** Set or clear migration flags.
p += sizeof("xlat_new_functions") - 1;
out = &cc->tmpl_rules.xlat.new_functions;
- } else if (strncmp(p, "tmpl_require_enum_prefix", sizeof("tmpl_require_enum_prefix") - 1) == 0) {
- p += sizeof("tmpl_require_enum_prefix") - 1;
- out = &tmpl_require_enum_prefix;
-
} else {
fr_strerror_const("Unknown migration flag");
RETURN_PARSE_ERROR(0);
break;
case 'S':
- if (strcmp(optarg, "require_enum_prefix=yes") == 0) {
- tmpl_require_enum_prefix = true;
- break;
- }
-
fprintf(stderr, "Invalid option to -S\n");
EXIT_WITH_FAILURE;
#define PAIR_SPACE(_cs) ((_cs->depth + 1) * 2)
#define SECTION_SPACE(_cs) (_cs->depth * 2)
-/*
- * For migration.
- */
-extern bool tmpl_require_enum_prefix;
-
void cf_pair_debug_log(CONF_SECTION const *cs, CONF_PAIR *cp, conf_parser_t const *rule)
{
char const *value;
cf_log_err(cp, "Please remove '&' from the attribute name");
return -1;
}
-
- if (tmpl_require_enum_prefix) {
- cf_log_warn(cp, "Please remove '&' from the attribute name");
- }
+ cf_log_warn(cp, "Please remove '&' from the attribute name");
break;
case TMPL_TYPE_DATA:
/*
* Migration configuration.
*/
-extern bool tmpl_require_enum_prefix;
bool xlat_func_bare_words = false;
static const conf_parser_t migrate_config[] = {
{ FR_CONF_OFFSET_FLAGS("rewrite_update", CONF_FLAG_HIDDEN, main_config_t, rewrite_update) },
{ FR_CONF_OFFSET_FLAGS("forbid_update", CONF_FLAG_HIDDEN, main_config_t, forbid_update) },
- /*
- * Do not add tmpl_require_enum_prefix here, as it is
- * parsed too late to affect anything. It must be passed
- * as a command-line option via
- *
- * -S v3_enum_names=yes
- */
-
CONF_PARSER_TERMINATOR
};
fr_exit(1);
}
- if (out == &main_config->require_enum_prefix) tmpl_require_enum_prefix = box.vb_bool;
+ if (out == &main_config->require_enum_prefix) {}
if (out == &main_config->xlat_func_bare_words) xlat_func_bare_words = box.vb_bool;
*out = box.vb_bool;
#include <ctype.h>
-extern bool tmpl_require_enum_prefix;
-
static fr_table_num_sorted_t const cond_quote_table[] = {
{ L("\""), T_DOUBLE_QUOTED_STRING }, /* Don't re-order, backslash throws off ordering */
{ L("'"), T_SINGLE_QUOTED_STRING },
/*
* If we parsed an attribute on the LHS, and the RHS looks like an enumerated
* value, then set the enumv.
- *
- * @todo tmpl_require_enum_prefix - maybe just _always_ set enumv, because the
- * caller shouldn't have set it?
*/
if (!rhs_rules->enumv && tmpl_is_attr(map->lhs) &&
(value[0] == ':') && value[1] == ':') {
slen = tmpl_afrom_substr(map, &map->rhs, &FR_SBUFF_IN(rhs, strlen(rhs)),
T_BARE_WORD, value_parse_rules_unquoted[T_BARE_WORD], &my_rules);
if (slen <= 0) {
- if (tmpl_require_enum_prefix) goto parse_as_attr;
-
- REDEBUG3("Failed parsing right-hand side as generic data type.");
- goto fail_rhs;
+ goto parse_as_attr;
}
/*
#include <ctype.h>
-/*
- * Migration flag for enum prefixes.
- */
-extern bool tmpl_require_enum_prefix;
-
-bool tmpl_require_enum_prefix = true;
-
/** Define a global variable for specifying a default request reference
*
* @param[in] _name what the global variable should be called.
#define CHECK_T_RULES do { \
if (!t_rules) { \
t_rules = &default_rules; \
- if (tmpl_require_enum_prefix) default_rules.attr.prefix = TMPL_ATTR_REF_PREFIX_AUTO; \
- } else if (tmpl_require_enum_prefix && (t_rules->attr.prefix == TMPL_ATTR_REF_PREFIX_YES)) { \
+ default_rules.attr.prefix = TMPL_ATTR_REF_PREFIX_AUTO; \
+ } else if (t_rules->attr.prefix == TMPL_ATTR_REF_PREFIX_YES) { \
default_rules = *t_rules; \
default_rules.attr.prefix = TMPL_ATTR_REF_PREFIX_AUTO; \
t_rules = &default_rules; \
fr_dict_attr_err_t dict_err;
fr_dict_attr_t const *our_parent = parent;
- fr_assert(!tmpl_require_enum_prefix || (at_rules->prefix != TMPL_ATTR_REF_PREFIX_YES));
+ fr_assert(at_rules->prefix != TMPL_ATTR_REF_PREFIX_YES);
fr_sbuff_marker(&m_s, name);
fr_sbuff_t our_name = FR_SBUFF(name); /* Take a local copy in case we need to back track */
bool is_raw = false;
tmpl_attr_rules_t const *at_rules;
- tmpl_attr_rules_t our_at_rules;
fr_sbuff_marker_t m_l;
fr_dict_attr_t const *namespace;
DEFAULT_RULES;
at_rules = &t_rules->attr;
- fr_assert(!tmpl_require_enum_prefix || (at_rules->prefix != TMPL_ATTR_REF_PREFIX_YES));
+ fr_assert(at_rules->prefix != TMPL_ATTR_REF_PREFIX_YES);
if (err) *err = TMPL_ATTR_ERROR_NONE;
*/
switch (at_rules->prefix) {
case TMPL_ATTR_REF_PREFIX_YES:
- if (!tmpl_require_enum_prefix) {
- if (!fr_sbuff_next_if_char(&our_name, '&')) {
- fr_strerror_const("Invalid attribute reference, missing '&' prefix");
- if (err) *err = TMPL_ATTR_ERROR_BAD_PREFIX;
- FR_SBUFF_ERROR_RETURN(&our_name);
- }
- break;
- }
-
- /*
- * Rewrite the prefix parsing to "auto", which affects the printing.
- */
- our_at_rules = *at_rules;
- our_at_rules.prefix = TMPL_ATTR_REF_PREFIX_AUTO;
- at_rules = &our_at_rules;
-
- FALL_THROUGH; /* if we do require enum prefixes, then the '&' is optional */
+ fr_assert(0);
+ break;
case TMPL_ATTR_REF_PREFIX_AUTO:
/*
if (tmpl_attr_is_list_attr(ar)) vpt->rules.attr.list_def = ar->ar_da;
- fr_assert(!tmpl_require_enum_prefix || (vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES));
+ fr_assert(vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES);
}
* Otherwise if there's no prefix and no enumv, we know this input can't be an enum name.
*/
if (!fr_sbuff_adv_past_str_literal(&our_in, "::")) {
- if (tmpl_require_enum_prefix) return 0;
-
- if (!t_rules->enumv) return 0;
+ return 0;
} else if (t_rules->enumv &&
((t_rules->enumv->type == FR_TYPE_IPV6_ADDR) ||
if (slen > 0) goto done_bareword;
fr_assert(!*out);
- fr_assert(!tmpl_require_enum_prefix || (t_rules->attr.prefix != TMPL_ATTR_REF_PREFIX_YES));
+ fr_assert(t_rules->attr.prefix != TMPL_ATTR_REF_PREFIX_YES);
/*
* See if it's an attribute reference
* attribute which is loaded later. In which
* case we allow parsing the enumeration.
*/
- if (tmpl_require_enum_prefix) {
- if (!fr_sbuff_is_str_literal(&our_in, "::")) {
- /*
- * Return the error string from parsing the attribute!
- */
- FR_SBUFF_ERROR_RETURN(&our_in);
- }
+ if (!fr_sbuff_is_str_literal(&our_in, "::")) {
+ /*
+ * Return the error string from parsing the attribute!
+ */
+ FR_SBUFF_ERROR_RETURN(&our_in);
}
/*
if (enumv) {
dst_type = enumv->type;
- } else if (!tmpl_require_enum_prefix) {
- dst_type = FR_TYPE_STRING; /* Default to strings */
-
} else if (vpt->quote != T_BARE_WORD) {
dst_type = FR_TYPE_STRING; /* quoted strings are strings */
/*
* Suppress the prefix on new syntax.
*/
- if (tmpl_require_enum_prefix && (ar_prefix == TMPL_ATTR_REF_PREFIX_YES)) {
+ if (ar_prefix == TMPL_ATTR_REF_PREFIX_YES) {
ar_prefix = TMPL_ATTR_REF_PREFIX_AUTO;
}
/*
* Suppress the prefix on new syntax.
*/
- if (tmpl_require_enum_prefix && (ar_prefix == TMPL_ATTR_REF_PREFIX_YES)) {
+ if (ar_prefix == TMPL_ATTR_REF_PREFIX_YES) {
ar_prefix = TMPL_ATTR_REF_PREFIX_AUTO;
}
fr_assert(tmpl_is_attr_unresolved(vpt) || tmpl_is_attr(vpt));
- fr_assert(!tmpl_require_enum_prefix || (vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES));
+ fr_assert(vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES);
/*
* Loop detection
default:
bare_word:
*out = p;
-
- if (tmpl_require_enum_prefix) {
- quote = '['; /* foo[1] is OK */
- } else {
- quote = '\0';
- }
+ quote = '['; /* foo[1] is OK */
skip_word:
*type = T_BARE_WORD;
if (!tmpl_is_attr(vpt)) return;
- fr_assert(!tmpl_require_enum_prefix || (vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES));
+ fr_assert(vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES);
da = tmpl_attr_tail_da(vpt);
#define UNLANG_IGNORE ((unlang_t *) -1)
-extern bool tmpl_require_enum_prefix;
-
static unsigned int unlang_number = 1;
/*
*/
static int unlang_fixup_map(map_t *map, UNUSED void *ctx)
{
- CONF_PAIR *cp = cf_item_to_pair(map->ci);
-
- /*
- * Anal-retentive checks.
- */
- if (!tmpl_require_enum_prefix && DEBUG_ENABLED3) {
- if (tmpl_is_attr(map->lhs) && (map->lhs->name[0] != '&')) {
- cf_log_warn(cp, "Please change attribute reference to '&%s %s ...'",
- map->lhs->name, fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"));
- }
-
- if (tmpl_is_attr(map->rhs) && (map->rhs->name[0] != '&')) {
- cf_log_warn(cp, "Please change attribute reference to '... %s &%s'",
- fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"), map->rhs->name);
- }
- }
-
switch (map->lhs->type) {
case TMPL_TYPE_ATTR:
case TMPL_TYPE_XLAT_UNRESOLVED:
{
CONF_PAIR *cp = cf_item_to_pair(map->ci);
- /*
- * Anal-retentive checks.
- */
- if (!tmpl_require_enum_prefix && DEBUG_ENABLED3) {
- if (tmpl_is_attr(map->lhs) && (map->lhs->name[0] != '&')) {
- cf_log_warn(cp, "Please change attribute reference to '&%s %s ...'",
- map->lhs->name, fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"));
- }
-
- if (tmpl_is_attr(map->rhs) && (map->rhs->name[0] != '&')) {
- cf_log_warn(cp, "Please change attribute reference to '... %s &%s'",
- fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"), map->rhs->name);
- }
- }
-
if (!ctx) {
/*
* Fixup RHS attribute references to change NUM_UNSPEC to NUM_ALL.
parent = tmpl_attr_tail_da(parent_map->lhs);
- /*
- * Anal-retentive checks.
- */
- if (!tmpl_require_enum_prefix && DEBUG_ENABLED3) {
- if (tmpl_is_attr(map->lhs) && (map->lhs->name[0] != '&')) {
- cf_log_warn(cp, "Please change attribute reference to '&%s %s ...'",
- map->lhs->name, fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"));
- }
-
- if (tmpl_is_attr(map->rhs) && (map->rhs->name[0] != '&')) {
- cf_log_warn(cp, "Please change attribute reference to '... %s &%s'",
- fr_table_str_by_value(fr_tokens_table, map->op, "<INVALID>"), map->rhs->name);
- }
- }
-
switch (map->lhs->type) {
case TMPL_TYPE_ATTR:
da = tmpl_attr_tail_da(map->lhs);
*/
token = cf_section_name2_quote(cs);
- if ((token == T_BARE_WORD) && tmpl_require_enum_prefix) {
+ if (token == T_BARE_WORD) {
slen = tmpl_afrom_attr_substr(gext, NULL, &gext->vpt,
&FR_SBUFF_IN(name2, strlen(name2)),
NULL,
}
/*
- * Bare word strings are attribute references when tmpl_require_enum_prefix=yes
+ * Bare word strings are attribute references
*/
if (tmpl_is_attr(vpt) || tmpl_is_attr_unresolved(vpt)) {
fail_attr:
}
/*
- * When tmpl_require_enum_prefix=yes, references to unresolved attributes
- * are instead compiled as "bare word" strings. Which we now forbid.
+ * References to unresolved attributes are forbidden. They are no longer "bare word
+ * strings".
*/
- if (tmpl_require_enum_prefix && (quote == T_BARE_WORD) && (tmpl_value_type(vpt) == FR_TYPE_STRING)) {
+ if ((quote == T_BARE_WORD) && (tmpl_value_type(vpt) == FR_TYPE_STRING)) {
goto fail_attr;
}
fr_dict_attr_t const *da = NULL;
fr_dict_enum_value_t const *type_enum = NULL;
+ ssize_t slen;
char *namespace = NULL;
char const *packet_name = NULL;
- char *p = NULL;
tmpl_t *vpt = NULL, *src_vpt = NULL, *dst_vpt = NULL;
*
* Or, bare word an require_enum_prefix means "attribute reference".
*/
- if ((name2[0] == '&') || tmpl_require_enum_prefix) {
- ssize_t slen;
-
- slen = tmpl_afrom_attr_substr(parent, NULL, &vpt,
- &FR_SBUFF_IN(name2, talloc_array_length(name2) - 1),
- NULL, unlang_ctx->rules);
- if (slen <= 0) {
- cf_log_perr(cs, "Invalid argument to 'subrequest', failed parsing packet-type");
- return NULL;
- }
-
- fr_assert(tmpl_is_attr(vpt));
-
- /*
- * Anything resembling an integer or string is
- * OK. Nothing else makes sense.
- */
- switch (tmpl_attr_tail_da(vpt)->type) {
- case FR_TYPE_INTEGER_EXCEPT_BOOL:
- case FR_TYPE_STRING:
- break;
-
- default:
- cf_log_err(cs, "Invalid data type for attribute %s. "
- "Must be an integer type or string", name2 + 1);
- talloc_free(vpt);
- return NULL;
- }
-
- dict = unlang_ctx->rules->attr.dict_def;
- packet_name = NULL;
- goto get_packet_type;
+ slen = tmpl_afrom_attr_substr(parent, NULL, &vpt,
+ &FR_SBUFF_IN(name2, talloc_array_length(name2) - 1),
+ NULL, unlang_ctx->rules);
+ if (slen <= 0) {
+ cf_log_perr(cs, "Invalid argument to 'subrequest', failed parsing packet-type");
+ return NULL;
}
+ fr_assert(tmpl_is_attr(vpt));
+
/*
- * foo.bar without '&' and NOT require_enum_prefix is fugly, we should disallow it.
+ * Anything resembling an integer or string is
+ * OK. Nothing else makes sense.
*/
- p = strchr(name2, '.');
- if (!p) {
- cf_log_warn(cs, "Please upgrade configuration to use '::%s' when changing packet types",
- name2);
-
- dict = unlang_ctx->rules->attr.dict_def;
- packet_name = name2;
-
- } else {
- cf_log_warn(cs, "Please upgrade configuration to use '@' when changing dictionaries");
-
- /*
- * subrequest foo.bar { ... }
- *
- * Change to dictionary "foo", packet type "bar".
- */
- MEM(namespace = talloc_strdup(parent, name2)); /* get a modifiable copy */
-
- p = namespace + (p - name2);
- *(p++) = '\0';
- packet_name = p;
-
- dict = fr_dict_by_protocol_name(namespace);
- if (!dict) {
- dict_ref = fr_dict_autoload_talloc(NULL, &dict, namespace);
- if (!dict_ref) {
- cf_log_err(cs, "Unknown namespace '%s'", namespace);
- talloc_free(namespace);
- return NULL;
- }
- }
+ switch (tmpl_attr_tail_da(vpt)->type) {
+ case FR_TYPE_INTEGER_EXCEPT_BOOL:
+ case FR_TYPE_STRING:
+ break;
- WARN("Deprecated syntax 'subrequest %s ...'", name2);
- WARN(" please switch to 'subrequest %s::%s ...", namespace, packet_name);
+ default:
+ cf_log_err(cs, "Invalid data type for attribute %s. "
+ "Must be an integer type or string", name2 + 1);
+ talloc_free(vpt);
+ return NULL;
}
+ dict = unlang_ctx->rules->attr.dict_def;
+ packet_name = NULL;
+
/*
* Use dict name instead of "namespace", because "namespace" can be omitted.
*/
# define XLAT_DEBUG(...)
#endif
-extern bool tmpl_require_enum_prefix;
-
/*
* The new tokenizer accepts most things which are accepted by the old one. Many of the errors will be
* different, though.
/*
* A bare word which is NOT a known attribute. That's an error.
*/
- if (tmpl_require_enum_prefix && tmpl_is_data_unresolved(vpt)) {
+ if (tmpl_is_data_unresolved(vpt)) {
fr_assert(quote == T_BARE_WORD);
fr_strerror_const("Failed parsing input");
fr_sbuff_set(&our_in, &opand_m);
fr_assert(t_rules->attr.allow_unresolved);
} else if (tmpl_is_data_unresolved(vpt)) {
- fr_assert(!tmpl_require_enum_prefix);
+ fr_assert(0);
fr_assert(quote == T_BARE_WORD);
fr_strerror_const("Failed parsing input");
#ifndef NDEBUG
if (vpt->name[0] == '%') {
fr_assert(vpt->rules.attr.prefix == TMPL_ATTR_REF_PREFIX_NO);
- } else if (!tmpl_require_enum_prefix) {
- fr_assert(vpt->rules.attr.prefix == TMPL_ATTR_REF_PREFIX_YES);
+ } else {
+ fr_assert(vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES);
}
#endif
tmpl_rules_t our_t_rules = *t_rules;
/*
- * The terminal rules for expressions includes "-" and "+", both of which are allowed in
- * enum names. If we pass the enumv down to the next function, it will see
- * "Access-Accept", and then only parse "Access". Which is wrong.
+ * Pass the enumv down ONLY if the RHS name begins with "::".
*
- * For now, if we _don't_ have tmpl_require_enum_prefix, then we don't pass the enumv,
- * and we somehow skip the entire enum name. The name is then resolved later by
- * something...
+ * Otherwise, the terminal rules for expressions includes "-" and "+", both of which are
+ * allowed in enum names. If we pass the enumv down to the next function, it will see
+ * "Access-Accept", and then only parse "Access". Which is wrong.
*/
- if (tmpl_require_enum_prefix && (lhs->type == XLAT_TMPL) && tmpl_is_attr(lhs->vpt) &&
+ if ((lhs->type == XLAT_TMPL) && tmpl_is_attr(lhs->vpt) &&
fr_sbuff_is_str_literal(&our_in, "::")) {
our_t_rules.enumv = tmpl_attr_tail_da(lhs->vpt);
}
*/
if (node->type == XLAT_TMPL) {
if (tmpl_is_data_unresolved(node->vpt)) {
- if (!tmpl_require_enum_prefix) {
- fr_strerror_const("Unexpected text - attribute names must be prefixed with '&'");
- } else {
- fr_strerror_const("Unknown attribute");
- }
- return -1;
+ fr_strerror_const("Unknown attribute");
+ return -1;
}
/*
# define XLAT_HEXDUMP(...)
#endif
-extern const bool tmpl_require_enum_prefix;
extern const bool xlat_func_bare_words;
/** These rules apply to literal values and function arguments inside of an expansion
*
*/
static CC_HINT(nonnull(1,2,4)) ssize_t xlat_tokenize_attribute(xlat_exp_head_t *head, fr_sbuff_t *in,
- fr_sbuff_parse_rules_t const *p_rules, tmpl_rules_t const *t_rules, tmpl_attr_prefix_t attr_prefix)
+ fr_sbuff_parse_rules_t const *p_rules, tmpl_rules_t const *t_rules)
{
tmpl_attr_error_t err;
tmpl_t *vpt = NULL;
XLAT_DEBUG("ATTRIBUTE <-- %.*s", (int) fr_sbuff_remaining(in), fr_sbuff_current(in));
/*
- * Suppress the prefix on new syntax.
- */
- if (tmpl_require_enum_prefix && (attr_prefix == TMPL_ATTR_REF_PREFIX_YES)) {
- attr_prefix = TMPL_ATTR_REF_PREFIX_AUTO;
- }
-
- /*
- * attr_prefix is NO for %{User-Name}
- *
- * attr_prefix is YES for %foo(&User-Name)
- *
- * attr_prefix is YES for (&User-Name == "foo")
- *
- * We also allow wildcards in the tmpls, ad we're being
- * called from within a %{...} block.
+ * We are called from %{foo}. So we don't use attribute prefixes.
*/
our_t_rules = *t_rules;
our_t_rules.attr.allow_wildcard = true;
- our_t_rules.attr.prefix = attr_prefix;
+ our_t_rules.attr.prefix = TMPL_ATTR_REF_PREFIX_NO;
fr_sbuff_marker(&m_s, in);
fr_sbuff_set(in, &m_s); /* backtrack */
fr_sbuff_marker_release(&m_s);
- if (xlat_tokenize_attribute(head, in, &attr_p_rules, t_rules, TMPL_ATTR_REF_PREFIX_NO) < 0) return -1;
+ if (xlat_tokenize_attribute(head, in, &attr_p_rules, t_rules) < 0) return -1;
if (!fr_sbuff_next_if_char(in, '}')) {
fr_strerror_const("Missing closing brace");
* @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 &&
+ if (node->data.enumv &&
(strncmp(node->fmt, "::", 2) == 0)) {
FR_SBUFF_IN_STRCPY_LITERAL_RETURN(out, "::");
}
* OR when the value-box functions are
* updated.
*/
- if (tmpl_require_enum_prefix && node->vpt->data.literal.enumv &&
+ if (node->vpt->data.literal.enumv &&
(strncmp(node->fmt, "::", 2) == 0)) {
FR_SBUFF_IN_STRCPY_LITERAL_RETURN(out, "::");
}
* Can't have prefix YES if we're using the new flag. The parser / tmpl alloc routines
* MUST have set this to prefix AUTO.
*/
- fr_assert(!tmpl_require_enum_prefix || (node->vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES));
-
- /*
- * Parsing &User-Name or User-Name gets printed as &User-Name.
- *
- * Parsing %{User-Name} gets printed as %{User-Name}
- */
- if (node->vpt->rules.attr.prefix == TMPL_ATTR_REF_PREFIX_YES) {
- fr_assert(!tmpl_require_enum_prefix);
-
- if (node->vpt->name[0] != '&') FR_SBUFF_IN_CHAR_RETURN(out, '&');
- FR_SBUFF_IN_STRCPY_RETURN(out, node->fmt);
- goto done;
- }
+ fr_assert(node->vpt->rules.attr.prefix != TMPL_ATTR_REF_PREFIX_YES);
/*
* No '&', print the name, BUT without any attribute prefix.
*/
- if (tmpl_require_enum_prefix && !node->vpt->rules.attr.xlat) {
+ if (!node->vpt->rules.attr.xlat) {
char const *p = node->fmt;
if (*p == '&') p++;
* tmpl. And update the function arguments to say "we want a tmpl, not a
* string".
*/
- if (spaces && !tmpl_require_enum_prefix && fr_sbuff_is_char(&our_in, '&')) {
- slen = xlat_tokenize_attribute(node->group, &our_in, our_p_rules, t_rules, TMPL_ATTR_REF_PREFIX_YES);
-
- } else if (spaces || xlat_func_bare_words) {
+ if (spaces || xlat_func_bare_words) {
/*
* Spaces - each argument is a bare word all by itself, OR an xlat thing all by itself.
*