mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 05:41:26 +02:00
[MINOR] tarpit timeout is also allowed in backends
Since the tarpit action may be set in backends too, its timeout must be configurable there.
This commit is contained in:
parent
036fae0ec9
commit
51c9bde060
@ -607,7 +607,7 @@ timeout httpreq X X X -
|
||||
timeout queue X - X X
|
||||
timeout server X - X X
|
||||
timeout srvtimeout X - X X (deprecated)
|
||||
timeout tarpit X X X -
|
||||
timeout tarpit X X X X
|
||||
transparent X X X -
|
||||
use_backend - X X -
|
||||
usesrc X - X X
|
||||
|
@ -680,6 +680,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
curproxy->timeout.connect = defproxy.timeout.connect;
|
||||
curproxy->timeout.server = defproxy.timeout.server;
|
||||
curproxy->timeout.queue = defproxy.timeout.queue;
|
||||
curproxy->timeout.tarpit = defproxy.timeout.tarpit;
|
||||
curproxy->source_addr = defproxy.source_addr;
|
||||
}
|
||||
|
||||
@ -2761,9 +2762,8 @@ int readcfgfile(const char *file)
|
||||
* parameters have been set or must be copied from contimeouts.
|
||||
*/
|
||||
if (curproxy != &defproxy) {
|
||||
if ((curproxy->cap & PR_CAP_FE) &&
|
||||
(!tv_isset(&curproxy->timeout.tarpit) ||
|
||||
__tv_iseq(&curproxy->timeout.tarpit, &defproxy.timeout.tarpit))) {
|
||||
if (!tv_isset(&curproxy->timeout.tarpit) ||
|
||||
__tv_iseq(&curproxy->timeout.tarpit, &defproxy.timeout.tarpit)) {
|
||||
/* tarpit timeout not set. We search in the following order:
|
||||
* default.tarpit, curr.connect, default.connect.
|
||||
*/
|
||||
|
@ -103,7 +103,7 @@ int proxy_parse_timeout(const char **args, struct proxy *proxy,
|
||||
} else if (!strcmp(args[0], "tarpit")) {
|
||||
tv = &proxy->timeout.tarpit;
|
||||
td = &defpx->timeout.tarpit;
|
||||
cap = PR_CAP_FE;
|
||||
cap = PR_CAP_FE | PR_CAP_BE;
|
||||
} else if (!strcmp(args[0], "http-request")) {
|
||||
tv = &proxy->timeout.httpreq;
|
||||
td = &defpx->timeout.httpreq;
|
||||
|
Loading…
x
Reference in New Issue
Block a user