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.
}
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))
{