Skip to content
Commit ed35aa8c authored by Michael Hope's avatar Michael Hope Committed by Jukka Rissanen
Browse files

net: use UNALIGNED_ACCESS when accessing s_addr on received packets.



The offset of the IP header in a received packet depends on the L2
header size.  For Ethernet this is 14 bytes which puts the u32 IPv4
addresses on a non-u32 byte boundary.  This causes chips that don't
support unaligned access (like the Cortex-M0) to fault.

The fixes in this patch are enough to ping the board and run the
http_server sample.

Signed-off-by: default avatarMichael Hope <mlhx@google.com>
parent 9851b1ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment