goto regex_error;
}
- ret = regex_exec(preg, value_p, talloc_array_length(value_p) - 1, rxmatch, &nmatch);
- if (ret < 0) {
+ slen = regex_exec(preg, value_p, talloc_array_length(value_p) - 1, rxmatch, &nmatch);
+ if (slen < 0) {
RERROR("%s", fr_strerror());
return -2;
}
if (check->op == T_OP_REG_EQ) {
+ /*
+ * Add in %{0}. %{1}, etc.
+ */
regex_sub_to_request(request, &preg, value_p, talloc_array_length(value_p) - 1,
rxmatch, nmatch);
ret = (slen == 1) ? 0 : -1;
return -1;
}
-
/*
* We've got to xlat the string before doing
* the comparison.