libipsec: Fix compiler warning with GCC 9

The compiler complains that "taking address of packed member ... of
class or structure 'ip6_hdr' may result in an unaligned pointer value".
We don't care if the address is aligned as we explicitly use untoh16()
to convert the read value.
This commit is contained in:
Tobias Brunner
2019-08-28 11:10:49 +02:00
parent d6949b15ab
commit 8cd5f33dd8
+1 -1
View File
@@ -335,7 +335,7 @@ ip_packet_t *ip_packet_create(chunk_t packet)
}
ip = (struct ip6_hdr*)packet.ptr;
/* remove any RFC 4303 TFC extra padding */
packet.len = min(packet.len, 40 + untoh16(&ip->ip6_plen));
packet.len = min(packet.len, 40 + untoh16((void*)&ip->ip6_plen));
if (!parse_transport_header_v6(ip, packet, &payload, &next_header,
&sport, &dport))
{