]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: session: remove debugging code
authorWilly Tarreau <w@1wt.eu>
Mon, 16 Dec 2013 09:12:54 +0000 (10:12 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 16 Dec 2013 09:12:54 +0000 (10:12 +0100)
The memset() was put here to corrupt memory for a debugging test,
it's not needed anymore and was unfortunately committed. It does
not harm anyway, it probably just slightly affects performance.

src/session.c

index 255731a57b0312f63e44f916609cda9efe19b37c..fa5d6452c41187901b4cca3f6c1281a74b2aaf82 100644 (file)
@@ -127,12 +127,6 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
 
        proxy_inc_fe_conn_ctr(l, p);
 
-       /* now evaluate the tcp-request layer4 rules. Since we expect to be able
-        * to abort right here as soon as possible, we check the rules before
-        * even initializing the stream interfaces.
-        */
-       memset(&s->si[0], 0x55, sizeof(s->si[0]));
-
        /* Add the minimum callbacks to prepare the connection's control layer.
         * We need this so that we can safely execute the ACLs used by the
         * "tcp-request connection" ruleset. We also carefully attach the
@@ -143,6 +137,10 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
        conn_attach(cli_conn, s, &sess_conn_cb);
        conn_ctrl_init(cli_conn);
 
+       /* now evaluate the tcp-request layer4 rules. Since we expect to be able
+        * to abort right here as soon as possible, we check the rules before
+        * even initializing the stream interfaces.
+        */
        if ((l->options & LI_O_TCP_RULES) && !tcp_exec_req_rules(s)) {
                /* let's do a no-linger now to close with a single RST. */
                setsockopt(cfd, SOL_SOCKET, SO_LINGER, (struct linger *) &nolinger, sizeof(struct linger));