summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip4_forward.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/ip4_forward.c')
-rw-r--r--src/vnet/ip/ip4_forward.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 1a1b7e5182b..5fc2552f5ca 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -948,10 +948,6 @@ ip4_lookup_init (vlib_main_t * vm)
clib_memset (&h, 0, sizeof (h));
- /* Set target ethernet address to all zeros. */
- clib_memset (h.ip4_over_ethernet[1].ethernet, 0,
- sizeof (h.ip4_over_ethernet[1].ethernet));
-
#define _16(f,v) h.f = clib_host_to_net_u16 (v);
#define _8(f,v) h.f = v;
_16 (l2_type, ETHERNET_ARP_HARDWARE_TYPE_ethernet);
@@ -1872,9 +1868,8 @@ ip4_arp_inline (vlib_main_t * vm,
hw_if0 = vnet_get_sup_hw_interface (vnm, sw_if_index0);
/* Src ethernet address in ARP header. */
- clib_memcpy_fast (h0->ip4_over_ethernet[0].ethernet,
- hw_if0->hw_address,
- sizeof (h0->ip4_over_ethernet[0].ethernet));
+ mac_address_from_bytes (&h0->ip4_over_ethernet[0].mac,
+ hw_if0->hw_address);
if (is_glean)
{
/* The interface's source address is stashed in the Glean Adj */
@@ -2046,8 +2041,7 @@ ip4_probe_neighbor (vlib_main_t * vm, ip4_address_t * dst, u32 sw_if_index,
sw_if_index);
}
- clib_memcpy_fast (h->ip4_over_ethernet[0].ethernet, hi->hw_address,
- sizeof (h->ip4_over_ethernet[0].ethernet));
+ mac_address_from_bytes (&h->ip4_over_ethernet[0].mac, hi->hw_address);
h->ip4_over_ethernet[0].ip4 = src[0];
h->ip4_over_ethernet[1].ip4 = dst[0];