From: Alan T. DeKok Date: Fri, 13 Nov 2009 13:15:51 +0000 (+0100) Subject: Allow !* to work X-Git-Tag: release_2_1_8~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b7417876d18e3b83e10263f0f3af6e03eb704e7;p=thirdparty%2Ffreeradius-server.git Allow !* to work The code to delete all attributes (as documented in unlang) was previously added in evaluate.c. But the parser hadn't been updated, so it was impossible to actually use that functionality. --- diff --git a/src/main/conffile.c b/src/main/conffile.c index 23d01c656a6..406285bae64 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -1511,6 +1511,7 @@ static int cf_section_read(const char *filename, int *lineno, FILE *fp, case T_OP_SUB: case T_OP_LE: case T_OP_GE: + case T_OP_CMP_FALSE: if (!this || (strcmp(this->name1, "update") != 0)) { radlog(L_ERR, "%s[%d]: Invalid operator in assignment", filename, *lineno); diff --git a/src/main/evaluate.c b/src/main/evaluate.c index 6ecd947d8fd..96283dad9bc 100644 --- a/src/main/evaluate.c +++ b/src/main/evaluate.c @@ -774,8 +774,7 @@ int radius_evaluate_condition(REQUEST *request, int modreturn, int depth, */ token = gettoken(&p, comp, sizeof(comp)); if ((token < T_OP_NE) || (token > T_OP_CMP_EQ) || - (token == T_OP_CMP_TRUE) || - (token == T_OP_CMP_FALSE)) { + (token == T_OP_CMP_TRUE)) { radlog(L_ERR, "Expected comparison at: %s", comp); return FALSE; } diff --git a/src/main/modcall.c b/src/main/modcall.c index c19f0e271a1..9143c081217 100644 --- a/src/main/modcall.c +++ b/src/main/modcall.c @@ -1360,6 +1360,7 @@ static modcallable *do_compile_modupdate(modcallable *parent, (vp->operator != T_OP_SUB) && (vp->operator != T_OP_LE) && (vp->operator != T_OP_GE) && + (vp->operator != T_OP_CMP_FALSE) && (vp->operator != T_OP_SET)) { pairfree(&head); pairfree(&vp);