VPP-1692: move NULL pointer check
TBH, this looks like merge damage or some such. Perfectly fine NULL pointer check, about three lines after it was needed. Change-Id: I52831062e30533a59fb76b644ee5ae389676d2ae Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
@ -1853,11 +1853,6 @@ ip4_arp_inline (vlib_main_t * vm,
|
|||||||
vlib_packet_template_get_packet (vm,
|
vlib_packet_template_get_packet (vm,
|
||||||
&im->ip4_arp_request_packet_template,
|
&im->ip4_arp_request_packet_template,
|
||||||
&bi0);
|
&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 */
|
/* Seems we're out of buffers */
|
||||||
if (PREDICT_FALSE (!h0))
|
if (PREDICT_FALSE (!h0))
|
||||||
{
|
{
|
||||||
@ -1865,6 +1860,11 @@ ip4_arp_inline (vlib_main_t * vm,
|
|||||||
continue;
|
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. */
|
/* Add rewrite/encap string for ARP packet. */
|
||||||
vnet_rewrite_one_header (adj0[0], h0, sizeof (ethernet_header_t));
|
vnet_rewrite_one_header (adj0[0], h0, sizeof (ethernet_header_t));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user