Create overridable macros for copying 2-byte-aligned IP addresses and MAC addresses

This commit is contained in:
goldsimon
2010-04-29 04:57:31 +00:00
parent 01d2a87f5d
commit 72c580236e
5 changed files with 46 additions and 44 deletions

View File

@@ -494,8 +494,8 @@ autoip_arp_reply(struct netif *netif, struct etharp_hdr *hdr)
/* Copy struct ip_addr2 to aligned ip_addr, to support compilers without
* structure packing (not using structure copy which breaks strict-aliasing rules).
*/
SMEMCPY(&sipaddr, &hdr->sipaddr, sizeof(sipaddr));
SMEMCPY(&dipaddr, &hdr->dipaddr, sizeof(dipaddr));
IPADDR2_COPY(&sipaddr, &hdr->sipaddr);
IPADDR2_COPY(&dipaddr, &hdr->dipaddr);
if ((netif->autoip->state == AUTOIP_STATE_PROBING) ||
((netif->autoip->state == AUTOIP_STATE_ANNOUNCING) &&