From: Christopher Faulet Date: Thu, 31 May 2018 14:04:53 +0000 (+0200) Subject: BUG/MINOR: contrib/mod_defender: Don't reset the status code during disconnect X-Git-Tag: v1.9-dev1~220 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=72de8eb7aa4c2e890ed1a5c89d40b8b041c71b0c;p=thirdparty%2Fhaproxy.git BUG/MINOR: contrib/mod_defender: Don't reset the status code during disconnect 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. --- diff --git a/contrib/mod_defender/spoa.c b/contrib/mod_defender/spoa.c index 34b24f4912..d2b333ce4c 100644 --- a/contrib/mod_defender/spoa.c +++ b/contrib/mod_defender/spoa.c @@ -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; }