On Wed, May 03, 2017 at 08:21:12PM -0700, James Brown wrote:
> If the send-proxy-v2 flag is set on a server, the PROXY (v2) is emitted on
> agent checks.
> 
> If send-proxy is set on a server, no PROXY protocol is emitted on agent
> checks.
> 
> I rather think that the correct behavior is not to send the PROXY protocol
> on agent checks...

You're totally right, this is stupid. Could you please check if the
following patch fixes it ?

diff --git a/src/checks.c b/src/checks.c
index 778fc6a..bee7101 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;
        }

Thanks,
Willy

Reply via email to