]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't bother checking operators here.
authorAlan T. DeKok <aland@freeradius.org>
Thu, 28 Jul 2022 14:48:54 +0000 (10:48 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 29 Jul 2022 01:58:18 +0000 (21:58 -0400)
The fr_edit_list_apply_list_assignment() function will check it
anyways.  Not checking it here means that we can later add new
operators without changing this code.

src/lib/unlang/edit.c

index 1e92f1cecc0710ecb0fb2c5779703d1671a6a3e9..1fdb2dfe049fa660c3c68da45024c71c6bc8e42a 100644 (file)
@@ -776,18 +776,6 @@ redo:
                                fr_pair_t *parent;
                                request_t *other = request;
 
-                               /*
-                                *      Get the list.
-                                *
-                                *      When we assign via :=, we create the LHS vp if it doesn't exist.  The
-                                *      same goes for =, <=, and |=.  Other operators require something on the
-                                *      LHS, so they will fail if the LHS doesn't exist.
-                                */
-                               if ((map->op != T_OP_SET) && (map->op != T_OP_EQ) && (map->op != T_OP_LE) && (map->op != T_OP_OR_EQ)) {
-                                       REDEBUG("Invalid operator %s for list", fr_tokens[map->op]);
-                                       goto error;
-                               }
-
                                fr_assert(!tmpl_is_list(current->lhs.vpt));
 
                                /*