]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: netscaler: rename cip_len to clarify its uage
authorBertrand Jacquin <jacquinb@amazon.com>
Wed, 13 Dec 2017 01:23:39 +0000 (01:23 +0000)
committerWilly Tarreau <w@1wt.eu>
Wed, 20 Dec 2017 06:04:07 +0000 (07:04 +0100)
cip_len was meant to be the length of the data encapsulated in the CIP
protocol, the size the IP and TCP header

src/connection.c

index e0b740ff92c5b6859012981f58624e19d859ade4..a47d4d1fdb775802d8eca5314e4cd5ed00369216 100644 (file)
@@ -702,7 +702,7 @@ int conn_recv_proxy(struct connection *conn, int flag)
 int conn_recv_netscaler_cip(struct connection *conn, int flag)
 {
        char *line;
-       uint32_t cip_len;
+       uint32_t hdr_len;
        uint8_t ip_v;
 
        /* we might have been called just after an asynchronous shutr */
@@ -740,7 +740,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
                goto missing;
 
        line = trash.str;
-       cip_len = ntohl(*(uint32_t *)(line+4));
+       hdr_len = ntohl(*(uint32_t *)(line+4));
 
        /* Decode a possible NetScaler Client IP request, fail early if
         * it does not match */
@@ -833,7 +833,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
                goto fail;
        }
 
-       line += cip_len;
+       line += hdr_len;
        trash.len = line - trash.str;
 
        /* remove the NetScaler Client IP header from the request. For this