mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-03-14 03:22:06 +01:00
BUG/MINOR: haterm: cannot reset default "haterm" mode
When "mode haterm" was set in a "defaults" section, it could not be
overridden in subsequent sections using the "mode" keyword. This is because
the proxy stream instantiation callback was not being reset to the
default stream_new() value.
This could break the stats URI with a configuration such as:
defaults
mode haterm
# ...
frontend stats
bind :8181
mode http
stats uri /
This patch ensures the ->stream_new_from_sc() proxy callback is reset
to stream_new() when the "mode" keyword is parsed for any mode other
than "haterm".
No need to backport.
This commit is contained in:
parent
a9dc8e2587
commit
ca5332a9c3
@ -669,6 +669,13 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
|
||||
err_code |= ERR_ALERT | ERR_FATAL;
|
||||
goto out;
|
||||
}
|
||||
else {
|
||||
/* valid mode, non "haterm" mode.
|
||||
* Possibly restore the ->stream_new_from_sc() callback
|
||||
* if set by default for "haterm" mode.
|
||||
*/
|
||||
curproxy->stream_new_from_sc = stream_new;
|
||||
}
|
||||
|
||||
curproxy->mode = mode;
|
||||
if (curproxy->cap & PR_CAP_DEF)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user