MINOR: connection: add pp2-never-send-local to support old PP2 behavior
authorWilly Tarreau <w@1wt.eu>
Fri, 22 May 2020 11:53:29 +0000 (13:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 22 May 2020 11:55:32 +0000 (13:55 +0200)
commit119e50e0cccdbbc1e719657b38f620aaa3e7f585
treec9593994e682e1c835eb890ef1e08f39f224d607
parent318adf43648143292a6e6b74d4600b4908172598
MINOR: connection: add pp2-never-send-local to support old PP2 behavior

A bug in the PROXY protocol v2 implementation was present in HAProxy up to
version 2.1, causing it to emit a PROXY command instead of a LOCAL command
for health checks. This is particularly minor but confuses some servers'
logs. Sadly, the bug was discovered very late and revealed that some servers
which possibly only tested their PROXY protocol implementation against
HAProxy fail to properly handle the LOCAL command, and permanently remain in
the "down" state when HAProxy checks them. When this happens, it is possible
to enable this global option to revert to the older (bogus) behavior for the
time it takes to contact the affected components' vendors and get them fixed.
This option is disabled by default and acts on all servers having the
"send-proxy-v2" statement.

Older versions were reverted to the old behavior and should not attempt to
be fixed by default again. However a variant of this patch could possibly
be implemented to ask to explicitly send LOCAL if needed by some servers.

More context here:
   https://www.mail-archive.com/haproxy@formilux.org/msg36890.html
   https://www.mail-archive.com/haproxy@formilux.org/msg37218.html
doc/configuration.txt
src/connection.c