From: Arran Cudbard-Bell Date: Fri, 8 May 2020 21:09:03 +0000 (-0500) Subject: rename more tmpl types to be consistent X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4e8ce53f64faec441acde512d901419ea3e611a;p=thirdparty%2Ffreeradius-server.git rename more tmpl types to be consistent --- diff --git a/src/lib/ldap/map.c b/src/lib/ldap/map.c index de4e61bf368..d40e36b623e 100644 --- a/src/lib/ldap/map.c +++ b/src/lib/ldap/map.c @@ -192,7 +192,7 @@ int fr_ldap_map_verify(vp_map_t *map, UNUSED void *instance) case TMPL_TYPE_ATTR: break; - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: cf_log_err(map->ci, "Unknown attribute %s", tmpl_unknown_name(map->lhs)); return -1; @@ -213,7 +213,7 @@ int fr_ldap_map_verify(vp_map_t *map, UNUSED void *instance) case TMPL_TYPE_UNPARSED: break; - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: cf_log_err(map->ci, "Unknown attribute %s", tmpl_unknown_name(map->rhs)); return -1; diff --git a/src/lib/server/cf_parse.c b/src/lib/server/cf_parse.c index 5d85d8c34e6..60ec5012ed8 100644 --- a/src/lib/server/cf_parse.c +++ b/src/lib/server/cf_parse.c @@ -179,7 +179,7 @@ int cf_pair_parse_value(TALLOC_CTX *ctx, void *out, UNUSED void *base, CONF_ITEM if (!cp->printed) cf_log_debug(cs, "%.*s%s = %s", PAIR_SPACE(cs), parse_spaces, cf_pair_attr(cp), cp->value); /* - * This is so we produce TMPL_TYPE_ATTR_UNDEFINED template that + * This is so we produce TMPL_TYPE_ATTR_UNPARSED template that * the bootstrap functions can use to create an attribute. * * For other types of template such as xlats, we don't bother. @@ -1411,7 +1411,7 @@ int cf_section_parse_pass2(void *base, CONF_SECTION *cs) /* * All attributes should have been defined by this point. */ - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: cf_log_err(cp, "Unknown attribute '%s'", tmpl_unknown_name(vpt)); talloc_free(vpt); /* Free last (vpt needed for log) */ return -1; @@ -1426,8 +1426,8 @@ int cf_section_parse_pass2(void *base, CONF_SECTION *cs) break; case TMPL_TYPE_UNKNOWN: + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_REGEX_STRUCT: case TMPL_TYPE_NULL: fr_assert(0); /* Don't add default */ diff --git a/src/lib/server/cond_eval.c b/src/lib/server/cond_eval.c index 035f1477eef..1ead86271f9 100644 --- a/src/lib/server/cond_eval.c +++ b/src/lib/server/cond_eval.c @@ -125,8 +125,8 @@ int cond_eval_tmpl(REQUEST *request, int modreturn, UNUSED int depth, vp_tmpl_t /* * Can't have a bare ... (/foo/) ... */ + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_REGEX_STRUCT: fr_assert(0 == 1); /* FALL-THROUGH */ @@ -166,7 +166,7 @@ static int cond_do_regex(REQUEST *request, fr_cond_t const *c, EVAL_DEBUG("CMP WITH REGEX"); switch (map->rhs->type) { - case TMPL_TYPE_REGEX_STRUCT: /* pre-compiled to a regex */ + case TMPL_TYPE_REGEX: /* pre-compiled to a regex */ preg = tmpl_preg(map->rhs); break; @@ -547,7 +547,7 @@ do {\ /* * RHS is a compiled regex, we don't need to do anything with it. */ - case TMPL_TYPE_REGEX_STRUCT: + case TMPL_TYPE_REGEX: CAST(lhs); rcode = cond_cmp_values(request, c, lhs, NULL); break; @@ -557,8 +557,8 @@ do {\ case TMPL_TYPE_NULL: case TMPL_TYPE_LIST: case TMPL_TYPE_UNKNOWN: - case TMPL_TYPE_ATTR_UNDEFINED: - case TMPL_TYPE_REGEX: /* Should now be a TMPL_TYPE_REGEX_STRUCT or TMPL_TYPE_XLAT */ + case TMPL_TYPE_ATTR_UNPARSED: + case TMPL_TYPE_REGEX_UNPARSED: /* Should now be a TMPL_TYPE_REGEX or TMPL_TYPE_XLAT */ fr_assert(0); rcode = -1; break; @@ -666,10 +666,10 @@ int cond_eval_map(REQUEST *request, UNUSED int modreturn, UNUSED int depth, fr_c * Unsupported types (should have been parse errors) */ case TMPL_TYPE_NULL: - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: case TMPL_TYPE_UNKNOWN: - case TMPL_TYPE_REGEX: /* should now be a TMPL_TYPE_REGEX_STRUCT or TMPL_TYPE_XLAT */ - case TMPL_TYPE_REGEX_STRUCT: /* not allowed as LHS */ + case TMPL_TYPE_REGEX_UNPARSED: /* should now be a TMPL_TYPE_REGEX or TMPL_TYPE_XLAT */ + case TMPL_TYPE_REGEX: /* not allowed as LHS */ fr_assert(0); rcode = -1; break; diff --git a/src/lib/server/cond_tokenize.c b/src/lib/server/cond_tokenize.c index 6a1c108732b..7fb3f1e7257 100644 --- a/src/lib/server/cond_tokenize.c +++ b/src/lib/server/cond_tokenize.c @@ -1418,7 +1418,7 @@ done: switch (c->data.vpt->type) { case TMPL_TYPE_XLAT_UNPARSED: case TMPL_TYPE_ATTR: - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: case TMPL_TYPE_LIST: case TMPL_TYPE_EXEC: break; diff --git a/src/lib/server/tmpl.c b/src/lib/server/tmpl.c index 2246694b371..cd8558e1e5b 100644 --- a/src/lib/server/tmpl.c +++ b/src/lib/server/tmpl.c @@ -36,17 +36,21 @@ RCSID("$Id$") /** Map #tmpl_type_t values to descriptive strings */ fr_table_num_sorted_t const tmpl_type_table[] = { - { "attr", TMPL_TYPE_ATTR }, + { "null", TMPL_TYPE_NULL }, { "data", TMPL_TYPE_DATA }, - { "exec", TMPL_TYPE_EXEC }, + + { "attr", TMPL_TYPE_ATTR }, { "list", TMPL_TYPE_LIST }, - { "literal", TMPL_TYPE_UNPARSED }, - { "null", TMPL_TYPE_NULL }, - { "parsed regex", TMPL_TYPE_REGEX_STRUCT }, - { "parsed xlat", TMPL_TYPE_XLAT }, + + { "exec", TMPL_TYPE_EXEC }, + { "xlat", TMPL_TYPE_XLAT }, + { "regex", TMPL_TYPE_REGEX }, - { "unknown attr", TMPL_TYPE_ATTR_UNDEFINED }, - { "xlat", TMPL_TYPE_XLAT_UNPARSED } + + { "literal", TMPL_TYPE_UNPARSED }, + { "attr-undefined", TMPL_TYPE_ATTR_UNPARSED }, + { "xlat-unparsed", TMPL_TYPE_XLAT_UNPARSED }, + { "regex-unparsed", TMPL_TYPE_REGEX_UNPARSED } }; size_t tmpl_type_table_len = NUM_ELEMENTS(tmpl_type_table); @@ -438,7 +442,7 @@ vp_tmpl_t *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *name, ssize fr_assert(type <= TMPL_TYPE_NULL); #ifndef HAVE_REGEX - if ((type == TMPL_TYPE_REGEX) || (type == TMPL_TYPE_REGEX_STRUCT)) { + if ((type == TMPL_TYPE_REGEX_UNPARSED) || (type == TMPL_TYPE_REGEX)) { return NULL; } #endif @@ -581,7 +585,7 @@ static vp_tmpl_rules_t const default_rules = { * to search for a #VALUE_PAIR in a #REQUEST. * - allow_undefined If true, we don't generate a parse error on * unknown attributes. If an unknown attribute is - * found a #TMPL_TYPE_ATTR_UNDEFINED + * found a #TMPL_TYPE_ATTR_UNPARSED * #vp_tmpl_t will be produced. * - allow_foreign If true, allow attribute names to be qualified * with a protocol outside of the passed dict_def. @@ -777,7 +781,7 @@ ssize_t tmpl_afrom_attr_substr(TALLOC_CTX *ctx, attr_ref_error_t *err, /* * Copy the name to a field for later resolution */ - vpt->type = TMPL_TYPE_ATTR_UNDEFINED; + vpt->type = TMPL_TYPE_ATTR_UNPARSED; for (q = p; (q < (name + name_len)) && ((*q == '.') || fr_dict_attr_allowed_chars[(uint8_t) *q]); q++); if (q == p) { fr_strerror_printf("Invalid attribute name"); @@ -1025,14 +1029,14 @@ ssize_t tmpl_afrom_attr_str(TALLOC_CTX *ctx, attr_ref_error_t *err, * @param[in] type of quoting around value. May be one of: * - #T_BARE_WORD - If string begins with ``&`` * produces #TMPL_TYPE_ATTR, - * #TMPL_TYPE_ATTR_UNDEFINED, #TMPL_TYPE_LIST or error. + * #TMPL_TYPE_ATTR_UNPARSED, #TMPL_TYPE_LIST or error. * If string does not begin with ``&`` produces * #TMPL_TYPE_UNPARSED, #TMPL_TYPE_ATTR or #TMPL_TYPE_LIST. * - #T_SINGLE_QUOTED_STRING - Produces #TMPL_TYPE_UNPARSED * - #T_DOUBLE_QUOTED_STRING - Produces #TMPL_TYPE_XLAT_UNPARSED or * #TMPL_TYPE_UNPARSED (if string doesn't contain ``%``). * - #T_BACK_QUOTED_STRING - Produces #TMPL_TYPE_EXEC - * - #T_OP_REG_EQ - Produces #TMPL_TYPE_REGEX + * - #T_OP_REG_EQ - Produces #TMPL_TYPE_REGEX_UNPARSED * @param[in] rules Parsing rules for attribute references. * @param[in] do_unescape whether or not we should do unescaping. * Should be false if the caller already did it. @@ -1223,7 +1227,7 @@ ssize_t tmpl_afrom_str(TALLOC_CTX *ctx, vp_tmpl_t **out, break; case T_OP_REG_EQ: /* hack */ - vpt = tmpl_alloc(ctx, TMPL_TYPE_REGEX, in, inlen, T_BARE_WORD); + vpt = tmpl_alloc(ctx, TMPL_TYPE_REGEX_UNPARSED, in, inlen, T_BARE_WORD); slen = vpt->len; break; @@ -1668,9 +1672,9 @@ ssize_t _tmpl_to_type(void *out, case TMPL_TYPE_UNKNOWN: case TMPL_TYPE_NULL: case TMPL_TYPE_LIST: + case TMPL_TYPE_REGEX_UNPARSED: + case TMPL_TYPE_ATTR_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_ATTR_UNDEFINED: - case TMPL_TYPE_REGEX_STRUCT: fr_assert(0); return -1; } @@ -1999,9 +2003,9 @@ ssize_t _tmpl_to_atype(TALLOC_CTX *ctx, void *out, case TMPL_TYPE_UNKNOWN: case TMPL_TYPE_NULL: case TMPL_TYPE_LIST: + case TMPL_TYPE_REGEX_UNPARSED: + case TMPL_TYPE_ATTR_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_ATTR_UNDEFINED: - case TMPL_TYPE_REGEX_STRUCT: fr_assert(0); goto error; } @@ -2108,7 +2112,7 @@ size_t tmpl_snprint_attr_str(size_t *need, char *out, size_t outlen, vp_tmpl_t c RETURN_IF_TRUNCATED(need, len, out_p, out, end); goto inst_and_tag; - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: p = tmpl_unknown_name(vpt); goto print_name; @@ -2208,7 +2212,7 @@ empty: switch (vpt->type) { case TMPL_TYPE_LIST: - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: case TMPL_TYPE_ATTR: *out_p++ = '&'; return tmpl_snprint_attr_str(need, out_p, end - out_p, vpt) + 1; @@ -2216,8 +2220,8 @@ empty: /* * Regexes have their own set of escaping rules */ + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_REGEX_STRUCT: if ((end - out_p) <= 3) { /* / + + / + \0 */ no_space: if (out_p > end) out_p = end; /* Safety */ @@ -2674,7 +2678,7 @@ void tmpl_verify(char const *file, int line, vp_tmpl_t const *vpt) /* tmpl_xlat(vpt) can be initialized */ break; - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: fr_assert(tmpl_da(vpt) == NULL); break; @@ -2818,26 +2822,26 @@ void tmpl_verify(char const *file, int line, vp_tmpl_t const *vpt) break; - case TMPL_TYPE_REGEX: + case TMPL_TYPE_REGEX_UNPARSED: #ifdef HAVE_REGEX if (tmpl_preg(vpt) != NULL) { - fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX " + fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX_UNPARSED " "preg field was not NULL", file, line); } #else - fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX - No regex support", + fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX_UNPARSED - No regex support", file, line); #endif break; - case TMPL_TYPE_REGEX_STRUCT: + case TMPL_TYPE_REGEX: #ifdef HAVE_REGEX if (tmpl_preg(vpt) == NULL) { - fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX_STRUCT " + fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX " "comp field was NULL", file, line); } #else - fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX_STRUCT - No regex support", + fr_fatal_assert_fail("CONSISTENCY CHECK FAILED %s[%u]: TMPL_TYPE_REGEX - No regex support", file, line); #endif break; diff --git a/src/lib/server/tmpl.h b/src/lib/server/tmpl.h index 383e50a336a..f083d17cc04 100644 --- a/src/lib/server/tmpl.h +++ b/src/lib/server/tmpl.h @@ -110,17 +110,39 @@ extern size_t request_ref_table_len; */ typedef enum tmpl_type_e { TMPL_TYPE_UNKNOWN = 0, //!< Uninitialised. - TMPL_TYPE_UNPARSED, //!< Unparsed literal string. - TMPL_TYPE_XLAT_UNPARSED, //!< XLAT expansion. - TMPL_TYPE_ATTR, //!< Dictionary attribute. - TMPL_TYPE_ATTR_UNDEFINED, //!< Attribute not found in the global dictionary. - TMPL_TYPE_LIST, //!< Attribute list. - TMPL_TYPE_REGEX, //!< Regular expression. + + TMPL_TYPE_NULL, //!< Has no value. Usually a placeholder in a binary + ///< expression that's really a unary expression. + TMPL_TYPE_DATA, //!< Value in native boxed format. + + TMPL_TYPE_LIST, //!< Reference to an attribute list. + TMPL_TYPE_ATTR, //!< Reference to one or more attributes. + TMPL_TYPE_EXEC, //!< Callout to an external script or program. - TMPL_TYPE_DATA, //!< Value in native format. - TMPL_TYPE_XLAT, //!< Pre-parsed XLAT expansion. - TMPL_TYPE_REGEX_STRUCT, //!< Pre-parsed regular expression. - TMPL_TYPE_NULL //!< Has no value. + TMPL_TYPE_XLAT, //!< Pre-parsed xlat expansion. + + TMPL_TYPE_REGEX, //!< Compiled (and possibly JIT'd) regular expression. + + /** @name Unparsed types + * + * These are tmpls which could not immediately be transformed into + * their "parsed" or "compiled" form due to missing references, + * or because the tmpl is "dynamic". + * + * @{ + */ + TMPL_TYPE_UNPARSED, //!< Unparsed literal string. May be an intermediary phase + ///< where the tmpl is created as a temporary structure + ///< during parsing. + + TMPL_TYPE_ATTR_UNPARSED, //!< An attribute reference that we couldn't resolve. + ///< May be resolvable later once more attributes are + ///< defined. + + TMPL_TYPE_XLAT_UNPARSED, //!< Unparsed xlat expansion. May have a dynamic element. + + TMPL_TYPE_REGEX_UNPARSED, //!< Unparsed regular expression. May have a dynamic element. + /** @} */ } tmpl_type_t; /** Helpers to verify the type of #vp_tmpl_t @@ -129,13 +151,13 @@ typedef enum tmpl_type_e { #define tmpl_is_unparsed(vpt) (vpt->type == TMPL_TYPE_UNPARSED) #define tmpl_is_xlat(vpt) (vpt->type == TMPL_TYPE_XLAT_UNPARSED) #define tmpl_is_attr(vpt) (vpt->type == TMPL_TYPE_ATTR) -#define tmpl_is_attr_undefined(vpt) (vpt->type == TMPL_TYPE_ATTR_UNDEFINED) +#define tmpl_is_attr_undefined(vpt) (vpt->type == TMPL_TYPE_ATTR_UNPARSED) #define tmpl_is_list(vpt) (vpt->type == TMPL_TYPE_LIST) -#define tmpl_is_regex(vpt) (vpt->type == TMPL_TYPE_REGEX) +#define tmpl_is_regex(vpt) (vpt->type == TMPL_TYPE_REGEX_UNPARSED) #define tmpl_is_exec(vpt) (vpt->type == TMPL_TYPE_EXEC) #define tmpl_is_data(vpt) (vpt->type == TMPL_TYPE_DATA) #define tmpl_is_xlat_struct(vpt) (vpt->type == TMPL_TYPE_XLAT) -#define tmpl_is_regex_struct(vpt) (vpt->type == TMPL_TYPE_REGEX_STRUCT) +#define tmpl_is_regex_struct(vpt) (vpt->type == TMPL_TYPE_REGEX) #define tmpl_is_null(vpt) (vpt->type == TMPL_TYPE_NULL) extern fr_table_num_sorted_t const tmpl_type_table[]; @@ -169,7 +191,7 @@ typedef struct vp_tmpl_rules_s vp_tmpl_rules_t; * * @section conditional_maps Use in conditional vp_map_t * When used as part of a condition it may be any of the RHS side types, as well as: - * - #TMPL_TYPE_REGEX_STRUCT (pre-parsed regex) + * - #TMPL_TYPE_REGEX (pre-parsed regex) * * @see vp_map_t */ @@ -211,7 +233,7 @@ struct vp_tmpl_s { } data; }; -/** @name Field accessors for #TMPL_TYPE_ATTR, #TMPL_TYPE_ATTR_UNDEFINED, #TMPL_TYPE_LIST +/** @name Field accessors for #TMPL_TYPE_ATTR, #TMPL_TYPE_ATTR_UNPARSED, #TMPL_TYPE_LIST * * @{ */ @@ -256,12 +278,12 @@ struct vp_tmpl_s { #define tmpl_value_type_set(_tmpl, _type) (_tmpl)->data.literal.type = (_type) /** @} */ -/** @name Field accessors for #TMPL_TYPE_REGEX_STRUCT and #TMPL_TYPE_REGEX +/** @name Field accessors for #TMPL_TYPE_REGEX and #TMPL_TYPE_REGEX_UNPARSED * * @{ */ #ifdef HAVE_REGEX -# define tmpl_preg(_tmpl) (_tmpl)->data.preg //!< #TMPL_TYPE_REGEX_STRUCT only. +# define tmpl_preg(_tmpl) (_tmpl)->data.preg //!< #TMPL_TYPE_REGEX only. # define tmpl_regex_flags(_tmpl) (_tmpl)->data.regex_flags #endif /** @} */ diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index 07ebe65f406..008a5645af0 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -369,7 +369,7 @@ static bool pass2_fixup_regex(CONF_ITEM const *ci, vp_tmpl_t *vpt, vp_tmpl_rules return false; } - vpt->type = TMPL_TYPE_REGEX_STRUCT; + vpt->type = TMPL_TYPE_REGEX; tmpl_preg(vpt) = preg; return true; @@ -1632,7 +1632,7 @@ static unlang_t *compile_map(unlang_t *parent, unlang_compile_t *unlang_ctx, CON case TMPL_TYPE_UNPARSED: case TMPL_TYPE_ATTR: case TMPL_TYPE_XLAT_UNPARSED: - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: case TMPL_TYPE_EXEC: break; diff --git a/src/lib/unlang/map.c b/src/lib/unlang/map.c index 45f88192345..3302526b7c5 100644 --- a/src/lib/unlang/map.c +++ b/src/lib/unlang/map.c @@ -154,8 +154,8 @@ static unlang_action_t list_mod_create(REQUEST *request, rlm_rcode_t *presult) request, tmpl_xlat(map->lhs), false); return UNLANG_ACTION_PUSHED_CHILD; + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_REGEX_STRUCT: case TMPL_TYPE_XLAT_UNPARSED: fr_assert(0); error: @@ -189,8 +189,8 @@ static unlang_action_t list_mod_create(REQUEST *request, rlm_rcode_t *presult) request, tmpl_xlat(map->rhs), false); return UNLANG_ACTION_PUSHED_CHILD; + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_REGEX_STRUCT: case TMPL_TYPE_XLAT_UNPARSED: fr_assert(0); goto error; @@ -339,8 +339,8 @@ static unlang_action_t unlang_map_state_init(REQUEST *request, rlm_rcode_t *pres request, tmpl_xlat(inst->src), false); return UNLANG_ACTION_PUSHED_CHILD; + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_REGEX: - case TMPL_TYPE_REGEX_STRUCT: case TMPL_TYPE_XLAT_UNPARSED: fr_assert(0); goto error; diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 606ac262883..93792d91d4f 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -1399,7 +1399,7 @@ static ssize_t xlat_func_map(UNUSED TALLOC_CTX *ctx, char **out, size_t outlen, case TMPL_TYPE_EXEC: case TMPL_TYPE_DATA: case TMPL_TYPE_LIST: - case TMPL_TYPE_REGEX: + case TMPL_TYPE_REGEX_UNPARSED: case TMPL_TYPE_UNPARSED: case TMPL_TYPE_XLAT_UNPARSED: break; diff --git a/src/modules/rlm_csv/rlm_csv.c b/src/modules/rlm_csv/rlm_csv.c index f9fdb3f4f93..dbc4aea87ab 100644 --- a/src/modules/rlm_csv/rlm_csv.c +++ b/src/modules/rlm_csv/rlm_csv.c @@ -282,7 +282,7 @@ static int csv_map_verify(vp_map_t *map, void *instance) case TMPL_TYPE_ATTR: break; - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: cf_log_err(map->ci, "Unknown attribute %s", tmpl_unknown_name(map->lhs)); return -1; @@ -304,7 +304,7 @@ static int csv_map_verify(vp_map_t *map, void *instance) } break; - case TMPL_TYPE_ATTR_UNDEFINED: + case TMPL_TYPE_ATTR_UNPARSED: cf_log_err(map->ci, "Unknown attribute %s", tmpl_unknown_name(map->rhs)); return -1;