commit | ed35aa8c63774b13800d199c647e35f8c14b6582 | [log] [tgz] |
---|---|---|
author | Michael Hope <mlhx@google.com> | Mon Jan 15 22:38:30 2018 +0100 |
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | Tue Jan 16 11:27:48 2018 +0200 |
tree | f1e625a823c5594d3b0a83d60730517b0c42b7ac | |
parent | 9851b1ac2188f791741b2f2b2b7ea5547a6cd2a1 [diff] |
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: Michael Hope <mlhx@google.com>