aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-10-14 11:02:37 -0700
committerFlorin Coras <florin.coras@gmail.com>2017-10-15 20:20:03 +0000
commitd172a62365523427aebd34444736632c9a68a463 (patch)
tree673707d7671b1d0c5182dd28dd72392dbae77467 /src/vnet/ip
parentd0a59722135ec77e637097ef99edb6865bc38929 (diff)
ip: avoid arp assert if out of buffers (VPP-1030)
Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/ip')
-rwxr-xr-xsrc/vnet/ip/ip4_forward.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index c2a2f79e02f..8b21869a410 100755
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2039,6 +2039,10 @@ ip4_arp_inline (vlib_main_t * vm,
&im->ip4_arp_request_packet_template,
&bi0);
+ /* Seems we're out of buffers */
+ if (PREDICT_FALSE (!h0))
+ continue;
+
/* Add rewrite/encap string for ARP packet. */
vnet_rewrite_one_header (adj0[0], h0,
sizeof (ethernet_header_t));