projects
/
haproxy-3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
098ae74
)
MINOR: filter: "filter" requires TCP or HTTP mode
author
Aurelien DARRAGON
<adarragon@haproxy.com>
Tue, 19 Sep 2023 15:34:36 +0000
(17:34 +0200)
committer
Christopher Faulet
<cfaulet@haproxy.com>
Fri, 6 Oct 2023 13:34:30 +0000
(15:34 +0200)
Prevent the use of "filter" when proxy is not in TCP or HTTP mode.
src/filters.c
patch
|
blob
|
history
diff --git
a/src/filters.c
b/src/filters.c
index
e55adee
..
14ab7f8
100644
(file)
--- a/
src/filters.c
+++ b/
src/filters.c
@@
-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;