Skip to content

Commit

Permalink
Merge pull request #2727 from watr-li/unaligned-access-cortex-m0
Browse files Browse the repository at this point in the history
Fix unaligned access on Samr21/Cortex-M0
  • Loading branch information
miri64 committed Apr 21, 2015
2 parents deeb514 + 5910cad commit ac25058
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/net/network_layer/sixlowpan/lowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ac25058

Please sign in to comment.