]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: contrib/mod_defender: Don't reset the status code during disconnect
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 31 May 2018 14:04:53 +0000 (16:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Jun 2018 15:34:50 +0000 (17:34 +0200)
When the connection is closed by HAProxy, the status code provided in the
DISCONNECT frame is lost. By retransmitting it in the agent's reply, we are sure
to have it in the SPOE logs.

This patch may be backported in 1.8.

contrib/mod_defender/spoa.c

index 34b24f4912336617d4a51416e77bd0fee661a18f..d2b333ce4cc5bc3c5f8baa54f37f543132b0591e 100644 (file)
@@ -1452,7 +1452,6 @@ read_frame_cb(evutil_socket_t fd, short events, void *arg)
                        if (client->status_code != SPOE_FRM_ERR_NONE)
                                LOG(client->worker, "<%lu> Peer closed connection: %s",
                                    client->id, spoe_frm_err_reasons[client->status_code]);
-                       client->status_code = SPOE_FRM_ERR_NONE;
                        goto disconnect;
        }