]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
We produce asserts on bad arguments
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 19 Jan 2021 14:30:20 +0000 (14:30 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 19 Jan 2021 14:30:20 +0000 (14:30 +0000)
src/lib/unlang/xlat_eval.c

index ecc90286126ee6589e4d040c30dcac55bd33066b..89d20a60f2aac6a49eedd48b7733080463b72df9 100644 (file)
@@ -566,16 +566,7 @@ static xlat_action_t xlat_eval_pair_real(TALLOC_CTX *ctx, fr_cursor_t *out, requ
 
        xlat_action_t           ret = XLAT_ACTION_DONE;
 
-       if (!tmpl_is_attr(vpt) && !tmpl_is_list(vpt)) {
-               if (tmpl_is_attr_unresolved(vpt)) {
-                       REDEBUG("Unknown attribute '%s'", vpt->name);
-                       return XLAT_ACTION_FAIL;
-               }
-
-               REDEBUG("Invalid expansion type %s",
-                       fr_table_str_by_value(tmpl_type_table, vpt->type, "<INVALID>"));
-               return XLAT_ACTION_FAIL;
-       }
+       fr_assert(tmpl_is_attr(vpt) || tmpl_is_list(vpt));
 
        /*
         *      See if we're dealing with an attribute in the request