BUG/MINOR: checks: don't send proxy protocol with agent checks

James Brown reported that agent-check mistakenly sends the proxy
protocol header when it's configured. This is obviously wrong as
the agent is an independant servie and not a traffic port, let's
disable this.

This fix must be backported to 1.7 and possibly 1.6.
This commit is contained in:
Willy Tarreau 2017-05-06 08:45:28 +02:00
parent 8abbd3daa7
commit f494977bc1

View File

@ -1559,7 +1559,7 @@ static int connect_conn_chk(struct task *t)
ret = SF_ERR_INTERNAL;
if (proto->connect)
ret = proto->connect(conn, check->type, quickack ? 2 : 0);
if (s->check.send_proxy) {
if (s->check.send_proxy && !(check->state & CHK_ST_AGENT)) {
conn->send_proxy_ofs = 1;
conn->flags |= CO_FL_SEND_PROXY;
}