]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: connection: fix naming of ip_v field
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 16:35:32 +0000 (17:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 1 Apr 2019 05:44:56 +0000 (07:44 +0200)
AIX defines ip_v as ip_ff.ip_fv in netinet/ip.h using a macro, and
unfortunately we do have a local variable with such a name and which
uses the same header file. Let's rename the variable to ip_ver to fix
this.

src/connection.c

index 37e48c528c1d3e0eb6353c0c3ee3458ced0b5afe..303f6df42e531f1dc06cfa9ffd75f72542cf8573 100644 (file)
@@ -789,7 +789,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
 {
        char *line;
        uint32_t hdr_len;
-       uint8_t ip_v;
+       uint8_t ip_ver;
        int ret;
 
        /* we might have been called just after an asynchronous shutr */
@@ -857,9 +857,9 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
                goto missing;
 
        /* Get IP version from the first four bits */
-       ip_v = (*line & 0xf0) >> 4;
+       ip_ver = (*line & 0xf0) >> 4;
 
-       if (ip_v == 4) {
+       if (ip_ver == 4) {
                struct ip *hdr_ip4;
                struct my_tcphdr *hdr_tcp;
 
@@ -889,7 +889,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
 
                conn->flags |= CO_FL_ADDR_FROM_SET | CO_FL_ADDR_TO_SET;
        }
-       else if (ip_v == 6) {
+       else if (ip_ver == 6) {
                struct ip6_hdr *hdr_ip6;
                struct my_tcphdr *hdr_tcp;