From: Arran Cudbard-Bell Date: Tue, 25 Jul 2017 17:56:17 +0000 (-0400) Subject: Allow paircmp with expanded/reference RHS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5e4e5f6bdece1c3046fc50e0fba70ec49bc6c19;p=thirdparty%2Ffreeradius-server.git Allow paircmp with expanded/reference RHS --- diff --git a/src/main/cond_tokenize.c b/src/main/cond_tokenize.c index ab7213597d8..f1a48366171 100644 --- a/src/main/cond_tokenize.c +++ b/src/main/cond_tokenize.c @@ -1165,9 +1165,7 @@ static ssize_t cond_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *start, * and do no parsing until after all of the modules * are loaded. But that has issues, too. */ - if ((c->data.map->lhs->type == TMPL_TYPE_UNPARSED) && - (lhs_type == T_BARE_WORD) && - (c->data.map->rhs->type == TMPL_TYPE_UNPARSED)) { + if ((c->data.map->lhs->type == TMPL_TYPE_UNPARSED) && (lhs_type == T_BARE_WORD)) { int hyphens = 0; bool may_be_attr = true; size_t i; diff --git a/src/main/unlang_compile.c b/src/main/unlang_compile.c index 42ba3dcc244..f635fb16f1d 100644 --- a/src/main/unlang_compile.c +++ b/src/main/unlang_compile.c @@ -829,12 +829,6 @@ static bool pass2_cond_callback(void *ctx, fr_cond_t *c) if (!radius_find_compare(map->lhs->tmpl_da)) return true; - if (map->rhs->type == TMPL_TYPE_ATTR) { - cf_log_err(map->ci, "Cannot compare virtual attribute %s to another attribute", - map->lhs->name); - return false; - } - if (map->rhs->type == TMPL_TYPE_REGEX) { cf_log_err(map->ci, "Cannot compare virtual attribute %s via a regex", map->lhs->name);