X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip4_forward.c;h=5fc2552f5ca0ac787951c99231b05af7ff4361ba;hb=37029305c671f4e2d091d6f6c22142634e409043;hp=1a1b7e5182b08783d9acace04578ab88dd445f57;hpb=13b2ba2ad5527c8185dce368993a3877e7daf7a2;p=vpp.git 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];