From: Willy Tarreau Date: Sat, 6 May 2017 06:45:28 +0000 (+0200) Subject: BUG/MINOR: checks: don't send proxy protocol with agent checks X-Git-Tag: v1.8-dev2~47 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f494977bc1a361c26f8cc0516366ef2662ac9502;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/checks.c b/src/checks.c index 778fc6acf8..bee7101247 100644 --- a/src/checks.c +++ b/src/checks.c @@ -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; }