int ret = ERR_NONE;
int check_type;
- if (!srv->do_check)
+ if (!srv->do_check || !(srv->proxy->cap & PR_CAP_BE))
goto out;
check_type = srv->check.tcpcheck_rules->flags & TCPCHK_RULES_PROTO_CHK;
const char *err;
int ret = ERR_NONE;
- if (!srv->do_agent)
+ if (!srv->do_agent || !(srv->proxy->cap & PR_CAP_BE))
goto out;
/* If there is no connect rule preceding all send / expect rules, an
if (srv->do_agent)
goto out;
+ if (!(curpx->cap & PR_CAP_BE)) {
+ memprintf(errmsg, "'%s' ignored because %s '%s' has no backend capability",
+ args[*cur_arg], proxy_type_str(curpx), curpx->id);
+ return ERR_WARN;
+ }
+
if (!rules) {
rules = calloc(1, sizeof(*rules));
if (!rules) {
static int srv_parse_check(char **args, int *cur_arg, struct proxy *curpx, struct server *srv,
char **errmsg)
{
+ if (!(curpx->cap & PR_CAP_BE)) {
+ memprintf(errmsg, "'%s' ignored because %s '%s' has no backend capability",
+ args[*cur_arg], proxy_type_str(curpx), curpx->id);
+ return ERR_WARN;
+ }
+
srv->do_check = 1;
return 0;
}