]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: backend: always release the previous connection into its own target srv_list
authorWilly Tarreau <w@1wt.eu>
Fri, 1 Feb 2019 10:54:23 +0000 (11:54 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 1 Feb 2019 10:58:33 +0000 (11:58 +0100)
commit3c4e19f4297dd426d221859904d3a785bfcf330a
treef75d9d9bb7d89b180ffa6072f97a924ce51ece53
parentdc21ff778bfa05553264fc15173c25a04046e09f
BUG/MEDIUM: backend: always release the previous connection into its own target srv_list

There was a bug reported in issue #19 regarding the fact that haproxy
could mis-route requests to the wrong server. It turns out that when
switching to another server, the old connection was put back into the
srv_list corresponding to the stream's target instead of this connection's
target. Thus if this connection was later picked, it was pointing to the
wrong server.

The patch fixes this and also clarifies the assignment to srv_conn->target
so that it's clear we don't change it when picking it from the srv_list.

This must be backported to 1.9 only.
src/backend.c