goto fail_entry;
}
- if (tmpl_contains_regex(new_map->rhs)) {
- /*
- * The default rules say that the check
- * items look at the control list, but
- * for regexes we want to look at the
- * request list.
- */
+ /*
+ * The default rule says that the check
+ * items look at the control list, but
+ * protocol attributes should be compared in the request.
+ */
+ if (!tmpl_attr_tail_da(new_map->lhs)->flags.internal) {
tmpl_attr_set_list(new_map->lhs, request_attr_request);
+ }
+ if (tmpl_contains_regex(new_map->rhs)) {
if (tmpl_is_regex_uncompiled(new_map->rhs) &&
(tmpl_regex_compile(new_map->rhs, false) < 0)) {
ERROR("%s[%d]: Failed compiling regular expression /%s/ - %s",