mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: check: report error on incompatible connect proto
Report an error when using an explicit proto for a connect rule with non-compatible mode in regards with the selected check type (tcp-check vs http-check).
This commit is contained in:
parent
7c14890183
commit
90eb93f792
@ -2282,6 +2282,16 @@ struct tcpcheck_rule *parse_tcpcheck_connect(char **args, int cur_arg, struct pr
|
||||
memprintf(errmsg, "'%s' : unknown MUX protocol '%s'.", args[cur_arg], args[cur_arg+1]);
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (strcmp(args[0], "tcp-check") == 0 && mux_proto->mode != PROTO_MODE_TCP) {
|
||||
memprintf(errmsg, "'%s' : invalid MUX protocol '%s' for tcp-check", args[cur_arg], args[cur_arg+1]);
|
||||
goto error;
|
||||
}
|
||||
else if (strcmp(args[0], "http-check") == 0 && mux_proto->mode != PROTO_MODE_HTTP) {
|
||||
memprintf(errmsg, "'%s' : invalid MUX protocol '%s' for http-check", args[cur_arg], args[cur_arg+1]);
|
||||
goto error;
|
||||
}
|
||||
|
||||
cur_arg++;
|
||||
}
|
||||
else if (strcmp(args[cur_arg], "comment") == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user