}
}
+ if (tmpl_contains_regex(map->lhs)) {
+ fr_sbuff_set(&our_in, &m_lhs);
+ fr_strerror_const("Unexpected regular expression");
+ goto error;
+ }
+
+ if ((map->op == T_OP_REG_EQ) || (map->op == T_OP_REG_NE)) {
+ if (!tmpl_contains_regex(map->rhs)) {
+ fr_sbuff_set(&our_in, &m_rhs);
+ fr_strerror_const("Expected regular expression after regex operator");
+ goto error;
+ }
+ } else {
+ if (tmpl_contains_regex(map->rhs)) {
+ fr_sbuff_set(&our_in, &m_rhs);
+ fr_strerror_const("Unexpected regular expression");
+ goto error;
+ }
+ }
+
MAP_VERIFY(map);
*out = map;
}
if (tmpl_contains_regex(new_map->rhs)) {
- if (!((new_map->op == T_OP_REG_EQ) ||
- (new_map->op == T_OP_REG_NE))) {
- ERROR("%s[%d]: Unexpected regular expression on RHS of check item",
- file, line);
- goto fail_entry;
- }
-
/*
* The default rules say that the check
* items look at the control list, but