mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-04-14 10:12:43 +02:00
BUG/MEDIUM: htx: check the HTX compatibility in dynamic use-backend rules
I would have sworn it was done, probably we lost it during the refactoring. If a frontend is in HTX and the backend not (and conersely), this is normally detected at config parsing time unless the rule is dynamic. In this case we must abort with an error 500. The logs will report "RR" (resource issue while processing request) with the frontend and the backend assigned, so that it's possible to figure what was attempted. This must be backported to 1.9.
This commit is contained in:
parent
3c4e19f429
commit
3e451842dc
@ -1324,6 +1324,10 @@ int stream_set_backend(struct stream *s, struct proxy *be)
|
||||
HA_ATOMIC_ADD(&be->beconn, 1));
|
||||
proxy_inc_be_ctr(be);
|
||||
|
||||
/* HTX/legacy must match */
|
||||
if ((s->sess->fe->options2 ^ be->options2) & PR_O2_USE_HTX)
|
||||
return 0;
|
||||
|
||||
/* assign new parameters to the stream from the new backend */
|
||||
s->si[1].flags &= ~SI_FL_INDEP_STR;
|
||||
if (be->options2 & PR_O2_INDEPSTR)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user