From: Arran Cudbard-Bell Date: Tue, 25 Jul 2017 18:00:02 +0000 (-0400) Subject: Allow paircompare to work with attribute references and expansions. Hopefully Fixes... X-Git-Tag: release_3_0_16~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e56048c98bfab25ae9453a52bbe6bcc02f20f515;p=thirdparty%2Ffreeradius-server.git Allow paircompare to work with attribute references and expansions. Hopefully Fixes #1947 --- diff --git a/src/main/modcall.c b/src/main/modcall.c index c385db21f4a..4723971d20f 100644 --- a/src/main/modcall.c +++ b/src/main/modcall.c @@ -3479,12 +3479,6 @@ static bool pass2_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); diff --git a/src/main/parser.c b/src/main/parser.c index 5fab262fdc2..8b57725a1f1 100644 --- a/src/main/parser.c +++ b/src/main/parser.c @@ -1196,9 +1196,7 @@ static ssize_t condition_tokenize(TALLOC_CTX *ctx, CONF_ITEM *ci, char const *st * 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_LITERAL) && - (lhs_type == T_BARE_WORD) && - (c->data.map->rhs->type == TMPL_TYPE_LITERAL)) { + if ((c->data.map->lhs->type == TMPL_TYPE_LITERAL) && (lhs_type == T_BARE_WORD)) { int hyphens = 0; bool may_be_attr = true; size_t i;