From: Olivier Houchard Date: Fri, 23 Nov 2018 13:23:07 +0000 (+0100) Subject: BUG/MEDIUM: connections: Don't reset the conn flags in *connect_server(). X-Git-Tag: v1.9-dev8~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=637b695d6a23acd2a63702f8be2c4510d80ddd26;p=thirdparty%2Fhaproxy.git BUG/MEDIUM: connections: Don't reset the conn flags in *connect_server(). In the various connect_server() functions, don't reset the connection flags, as some may have been set before. The flags are initialized in conn_init(), anyway. --- diff --git a/src/proto_sockpair.c b/src/proto_sockpair.c index bc8557a0d0..ba82c5ea5e 100644 --- a/src/proto_sockpair.c +++ b/src/proto_sockpair.c @@ -242,8 +242,6 @@ static int sockpair_connect_server(struct connection *conn, int data, int delack /* the FD is stored in the sockaddr struct */ dst_fd = ((struct sockaddr_in *)&conn->addr.to)->sin_addr.s_addr; - conn->flags = 0; - if (obj_type(conn->target) != OBJ_TYPE_PROXY && obj_type(conn->target) != OBJ_TYPE_SERVER) { conn->flags |= CO_FL_ERROR; diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 3cc622a6d4..c7951c55a4 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -289,7 +289,7 @@ int tcp_connect_server(struct connection *conn, int data, int delack) struct proxy *be; struct conn_src *src; - conn->flags = CO_FL_WAIT_L4_CONN; /* connection in progress */ + conn->flags |= CO_FL_WAIT_L4_CONN; /* connection in progress */ switch (obj_type(conn->target)) { case OBJ_TYPE_PROXY: diff --git a/src/proto_uxst.c b/src/proto_uxst.c index ab788bde72..149ba8e32f 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -434,8 +434,6 @@ static int uxst_connect_server(struct connection *conn, int data, int delack) struct server *srv; struct proxy *be; - conn->flags = 0; - switch (obj_type(conn->target)) { case OBJ_TYPE_PROXY: be = objt_proxy(conn->target);