We explicitly use untoh16() so this warning isn't relevant:
ip_packet.c:313:42: error: taking address of packed member 'ip_len' of class or structure 'ip' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
}
ip = (struct ip*)packet.ptr;
/* remove any RFC 4303 TFC extra padding */
- packet.len = min(packet.len, untoh16(&ip->ip_len));
+ packet.len = min(packet.len, untoh16((void*)&ip->ip_len));
payload = chunk_skip(packet, ip->ip_hl * 4);
if ((ip->ip_off & htons(IP_OFFMASK)) == 0 &&
!parse_transport_header(payload, ip->ip_p, &sport, &dport))