[mod_extforward] quiet clang compiler warning

It does seem possible for PROXY protocol subelements to be misaligned
and a message has been sent to HAProxy author of the PROXY protocol.

On most modern processors and operating systems, misaligned access has a
cost, but not the outrageous cost that it historical had on processors
and older operating systems such as on SPARC processors running Solaris
prior to Solaris 11.
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent 21081c7b72
commit b298e2acb0
  1. 3
      src/mod_extforward.c

@ -1520,7 +1520,8 @@ static int mod_extforward_hap_PROXY_v2 (connection * const con,
static const uint32_t zero = 0;
handler_ctx *hctx =
con->plugin_ctx[mod_extforward_plugin_data_singleton->id];
struct pp2_tlv_ssl *tlv_ssl = (struct pp2_tlv_ssl *)((char *)tlv+3);
struct pp2_tlv_ssl *tlv_ssl =
(struct pp2_tlv_ssl *)(void *)((char *)tlv+3);
struct pp2_tlv *subtlv = tlv;
if (tlv_ssl->client & PP2_CLIENT_SSL) {
buffer_copy_string_len(con->proto, CONST_STR_LEN("https"));

Loading…
Cancel
Save