]> git.ipfire.org Git - thirdparty/dhcpcd.git/commit
DHCP: Fix strict aliasing of checksumming the pseudo header
authorRoy Marples <roy@marples.name>
Wed, 16 Oct 2019 13:56:21 +0000 (14:56 +0100)
committerRoy Marples <roy@marples.name>
Wed, 16 Oct 2019 13:56:21 +0000 (14:56 +0100)
commitec9fe8039fedacd6eaa7cbdfebab7838826ef030
treeaf8dd2794208ef1dba75d6732b8c214ef6f86fdd
parent0209dbe976b27ba88840406685bbf1ceca2c5e8f
DHCP: Fix strict aliasing of checksumming the pseudo header

in_cksum relies on accessing the data by uint16_t blocks.

Because the underlying object we send to in_cksum is struct ip,
we need to use union to allow access by uint16_t so strict aliasing
rules are not broken.
src/dhcp.c