aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-10-14 11:02:37 -0700
committerDave Wallace <dwallacelf@gmail.com>2017-10-16 05:01:04 +0000
commita416ea9f02563396b984dfcb6a24aa57279dc95b (patch)
tree75a421a18d78d877a1da2b19cf88f16bfabc8517
parent84db40e02e74efabe094e0d46ed2fafd348d126d (diff)
ip: avoid arp assert if out of buffers (VPP-1030)
Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit d172a62365523427aebd34444736632c9a68a463)
-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 58cfd1816d8..6b3453b58f7 100755
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2093,6 +2093,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));