diff --git a/src/core/ipv4/etharp.c b/src/core/ipv4/etharp.c index b599bcc2..9742d900 100644 --- a/src/core/ipv4/etharp.c +++ b/src/core/ipv4/etharp.c @@ -456,7 +456,7 @@ etharp_update_arp_entry(struct netif *netif, const ip4_addr_t *ipaddr, struct et LWIP_DEBUGF(ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_update_arp_entry: updating stable entry %"S16_F"\n", (s16_t)i)); /* update address */ - ETHADDR32_COPY(&arp_table[i].ethaddr, ethaddr); + ETHADDR16_COPY(&arp_table[i].ethaddr, ethaddr); /* reset time stamp */ arp_table[i].ctime = 0; /* this is where we will send out queued packets! */ diff --git a/src/include/lwip/prot/ethernet.h b/src/include/lwip/prot/ethernet.h index e4baa29d..b7a967f0 100644 --- a/src/include/lwip/prot/ethernet.h +++ b/src/include/lwip/prot/ethernet.h @@ -149,12 +149,6 @@ enum eth_type { #define LL_IP6_MULTICAST_ADDR_0 0x33 #define LL_IP6_MULTICAST_ADDR_1 0x33 -/** MEMCPY-like macro to copy to/from struct eth_addr's that are local variables - * or known to be 32-bit aligned within the protocol header. */ -#ifndef ETHADDR32_COPY -#define ETHADDR32_COPY(dst, src) SMEMCPY(dst, src, ETH_HWADDR_LEN) -#endif - /** MEMCPY-like macro to copy to/from struct eth_addr's that are no local * variables and known to be 16-bit aligned within the protocol header. */ #ifndef ETHADDR16_COPY diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c index 9b76e85f..d2924fb1 100644 --- a/src/netif/ethernet.c +++ b/src/netif/ethernet.c @@ -289,7 +289,7 @@ ethernet_output(struct netif* netif, struct pbuf* p, ethhdr = (struct eth_hdr*)p->payload; ethhdr->type = eth_type_be; - ETHADDR32_COPY(ðhdr->dest, dst); + ETHADDR16_COPY(ðhdr->dest, dst); ETHADDR16_COPY(ðhdr->src, src); LWIP_ASSERT("netif->hwaddr_len must be 6 for ethernet_output!",