summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/ip/ip4_forward.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index 85e6607a963..e18a40b27e5 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -1853,11 +1853,6 @@ ip4_arp_inline (vlib_main_t * vm,
vlib_packet_template_get_packet (vm,
&im->ip4_arp_request_packet_template,
&bi0);
- b0 = vlib_get_buffer (vm, bi0);
-
- /* copy the persistent fields from the original */
- clib_memcpy_fast (b0->opaque2, p0->opaque2, sizeof (p0->opaque2));
-
/* Seems we're out of buffers */
if (PREDICT_FALSE (!h0))
{
@@ -1865,6 +1860,11 @@ ip4_arp_inline (vlib_main_t * vm,
continue;
}
+ b0 = vlib_get_buffer (vm, bi0);
+
+ /* copy the persistent fields from the original */
+ clib_memcpy_fast (b0->opaque2, p0->opaque2, sizeof (p0->opaque2));
+
/* Add rewrite/encap string for ARP packet. */
vnet_rewrite_one_header (adj0[0], h0, sizeof (ethernet_header_t));