From e56048c98bfab25ae9453a52bbe6bcc02f20f515 Mon Sep 17 00:00:00 2001 From: Arran Cudbard-Bell Date: Tue, 25 Jul 2017 14:00:02 -0400 Subject: [PATCH] Allow paircompare to work with attribute references and expansions. Hopefully Fixes #1947 --- src/main/modcall.c | 6 ------ src/main/parser.c | 4 +--- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/modcall.c b/src/main/modcall.c index c385db21f4..4723971d20 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 5fab262fdc..8b57725a1f 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;