]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow paircompare to work with attribute references and expansions. Hopefully Fixes...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 25 Jul 2017 18:00:02 +0000 (14:00 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 25 Jul 2017 18:00:02 +0000 (14:00 -0400)
src/main/modcall.c
src/main/parser.c

index c385db21f4a53ee6e98897346677a6df32dcdf25..4723971d20f7fbb7a369c8c28c073d88df6a5983 100644 (file)
@@ -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);
index 5fab262fdc2c77b050a5e62fd5dc3b7fb3bc4c73..8b57725a1f151b2336416af85094401243a523cb 100644 (file)
@@ -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;