mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-11 03:31:36 +00:00
BUILD: quic: fix warning during compilation using gcc-6.5
Building with gcc-6.5: src/quic_conn.c: In function 'send_retry': src/quic_conn.c:6554:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] *((uint32_t *)((unsigned char *)&buf[i])) = htonl(qv->num); This patch use write_n32 to set the value. This could be backported until v2.6
This commit is contained in:
parent
e5a17b0bc0
commit
c0456f45c8
@ -6552,7 +6552,7 @@ static int send_retry(int fd, struct sockaddr_storage *addr,
|
||||
(quic_pkt_type(QUIC_PACKET_TYPE_RETRY, qv->num) << QUIC_PACKET_TYPE_SHIFT) |
|
||||
statistical_prng_range(16);
|
||||
/* version */
|
||||
*(uint32_t *)&buf[i] = htonl(qv->num);
|
||||
write_n32(&buf[i], qv->num);
|
||||
i += sizeof(uint32_t);
|
||||
|
||||
/* Use the SCID from <pkt> for Retry DCID. */
|
||||
|
Loading…
Reference in New Issue
Block a user