Merge pull request #2727 from watr-li/unaligned-access-cortex-m0

Fix unaligned access on Samr21/Cortex-M0
dev/timer
Martine Lenders 8 years ago
commit ac25058f26

@ -1107,7 +1107,8 @@ uint8_t lowpan_iphc_encoding(int if_id, const uint8_t *dest, int dest_len,
else if (ipv6_buf->destaddr.uint32[2] == HTONL(0x000000ff) &&
ipv6_buf->destaddr.uint16[6] == HTONS(0xfe00)) {
if (dest_len == 2 &&
ipv6_buf->destaddr.uint16[7] == *((uint16_t *) dest)) {
ipv6_buf->destaddr.uint8[14] == dest[0] &&
ipv6_buf->destaddr.uint8[15] == dest[1]) {
/* 0 bits. The address is derived using context information
* and possibly the link-layer addresses.*/
lowpan_iphc[1] |= 0x03;

Loading…
Cancel
Save