]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: connections: Don't reset the conn flags in *connect_server().
authorOlivier Houchard <ohouchard@haproxy.com>
Fri, 23 Nov 2018 13:23:07 +0000 (14:23 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 23 Nov 2018 13:55:18 +0000 (14:55 +0100)
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.

src/proto_sockpair.c
src/proto_tcp.c
src/proto_uxst.c

index bc8557a0d0b2302cc0fd5a63da484a428328b565..ba82c5ea5e03e05ab101167363d5dfd61dd6c267 100644 (file)
@@ -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;
index 3cc622a6d453b2bda12dcaf55e4566aa998ab36c..c7951c55a461b90a4a430e4015ac09774de995b9 100644 (file)
@@ -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:
index ab788bde720fa1f1a252b787ce8387f808d2efbe..149ba8e32f13faba598bae4b907ace6437a19a5d 100644 (file)
@@ -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);