]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allow paircmp with expanded/reference RHS
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 25 Jul 2017 17:56:17 +0000 (13:56 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 25 Jul 2017 17:56:17 +0000 (13:56 -0400)
src/main/cond_tokenize.c
src/main/unlang_compile.c

index ab7213597d84d45cf2e6c3bc0ad1e6bd19b8b5e4..f1a48366171bc335de2b4397ed53a41854829686 100644 (file)
@@ -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;
index 42ba3dcc2448a3646046a9f6183d5d5c2b990ba9..f635fb16f1d0abb3723394a1bd4ac1c018c885f0 100644 (file)
@@ -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);