BUG/MINOR: connection: make sure to correctly tag local PROXY connections
authorWilly Tarreau <w@1wt.eu>
Wed, 19 Feb 2020 14:10:00 +0000 (15:10 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 28 Feb 2020 10:03:20 +0000 (11:03 +0100)
commitf1b378487af3f22fd66b8013e52530c9a6c522de
tree6d91f0dcc1cae8f859cc134118bb64ffeb123ea6
parent5282c302991cb7b9fe5250c4bc7a50ca82daf49e
BUG/MINOR: connection: make sure to correctly tag local PROXY connections

As reported in issue #511, when sending an outgoing local connection
(e.g. health check) we must set the "local" tag and not a "proxy" tag.
The issue comes from historic support on v1 which required to steal the
address on the outgoing connection for such ones, creating confusion in
the v2 code which believes it sees the incoming connection.

In order not to risk to break existing setups which might rely on seeing
the LB's address in the connection's source field, let's just change the
connection type from proxy to local and keep the addresses. The protocol
spec states that for local, the addresses must be ignored anyway.

This problem has always existed, this can be backported as far as 1.5,
though it's probably not a good idea to change such setups, thus maybe
2.0 would be more reasonable.

(cherry picked from commit 7f26391bc51ad56c31480d03f56e1db604f1c617)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/connection.c