You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.6 KiB

  1. commit a49725beede82687afd6603384f318afe9e60432
  2. Author: Willy Tarreau <w@1wt.eu>
  3. Date: Fri Mar 29 17:35:32 2019 +0100
  4. BUILD: connection: fix naming of ip_v field
  5. AIX defines ip_v as ip_ff.ip_fv in netinet/ip.h using a macro, and
  6. unfortunately we do have a local variable with such a name and which
  7. uses the same header file. Let's rename the variable to ip_ver to fix
  8. this.
  9. (cherry picked from commit 0ca24aa028159874d77677076a835930de79ba8d)
  10. Signed-off-by: Willy Tarreau <w@1wt.eu>
  11. (cherry picked from commit 0a5e7a9a39e14dccba4caa7df20cd3970f354078)
  12. Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
  13. diff --git a/src/connection.c b/src/connection.c
  14. index 7403e8ae..f57ef60a 100644
  15. --- a/src/connection.c
  16. +++ b/src/connection.c
  17. @@ -699,7 +699,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
  18. {
  19. char *line;
  20. uint32_t hdr_len;
  21. - uint8_t ip_v;
  22. + uint8_t ip_ver;
  23. /* we might have been called just after an asynchronous shutr */
  24. if (conn->flags & CO_FL_SOCK_RD_SH)
  25. @@ -765,9 +765,9 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
  26. goto missing;
  27. /* Get IP version from the first four bits */
  28. - ip_v = (*line & 0xf0) >> 4;
  29. + ip_ver = (*line & 0xf0) >> 4;
  30. - if (ip_v == 4) {
  31. + if (ip_ver == 4) {
  32. struct ip *hdr_ip4;
  33. struct my_tcphdr *hdr_tcp;
  34. @@ -797,7 +797,7 @@ int conn_recv_netscaler_cip(struct connection *conn, int flag)
  35. conn->flags |= CO_FL_ADDR_FROM_SET | CO_FL_ADDR_TO_SET;
  36. }
  37. - else if (ip_v == 6) {
  38. + else if (ip_ver == 6) {
  39. struct ip6_hdr *hdr_ip6;
  40. struct my_tcphdr *hdr_tcp;