]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: netscaler: remove the use of cip_magic only used once
authorBertrand Jacquin <jacquinb@amazon.com>
Wed, 13 Dec 2017 01:07:12 +0000 (01:07 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Dec 2017 06:04:07 +0000 (07:04 +0100)
src/connection.c

index 8637895a355f4e3486a9325d685166bcc975a619..e0b740ff92c5b6859012981f58624e19d859ade4 100644 (file)
@@ -702,7 +702,6 @@ int conn_recv_proxy(struct connection *conn, int flag)
 int conn_recv_netscaler_cip(struct connection *conn, int flag)
 {
        char *line;
-       uint32_t cip_magic;
        uint32_t cip_len;
        uint8_t ip_v;
 
@@ -741,13 +740,11 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
                goto missing;
 
        line = trash.str;
-
-       cip_magic = ntohl(*(uint32_t *)line);
        cip_len = ntohl(*(uint32_t *)(line+4));
 
        /* Decode a possible NetScaler Client IP request, fail early if
         * it does not match */
-       if (cip_magic != objt_listener(conn->target)->bind_conf->ns_cip_magic)
+       if (ntohl(*(uint32_t *)line) != objt_listener(conn->target)->bind_conf->ns_cip_magic)
                goto bad_magic;
 
        /* Fail if buffer length is not large enough to contain