mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
MINOR: filter: "filter" requires TCP or HTTP mode
Prevent the use of "filter" when proxy is not in TCP or HTTP mode.
This commit is contained in:
parent
098ae743fd
commit
f9422551cd
1 changed files with 5 additions and 0 deletions
|
|
@ -201,6 +201,11 @@ parse_filter(char **args, int section_type, struct proxy *curpx,
|
|||
file, line, args[0]);
|
||||
return -1;
|
||||
}
|
||||
if (curpx->mode != PR_MODE_TCP && curpx->mode != PR_MODE_HTTP) {
|
||||
memprintf(err, "parsing [%s:%d] : '%s' requires TCP or HTTP mode.",
|
||||
file, line, args[0]);
|
||||
return -1;
|
||||
}
|
||||
if (strcmp(args[0], "filter") == 0) {
|
||||
struct flt_kw *kw;
|
||||
int cur_arg;
|
||||
|
|
|
|||
Loading…
Reference in a new issue