diff options
author | Florin Coras <fcoras@cisco.com> | 2017-10-14 11:02:37 -0700 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2017-10-16 05:01:04 +0000 |
commit | a416ea9f02563396b984dfcb6a24aa57279dc95b (patch) | |
tree | 75a421a18d78d877a1da2b19cf88f16bfabc8517 | |
parent | 84db40e02e74efabe094e0d46ed2fafd348d126d (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-x | src/vnet/ip/ip4_forward.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c index 58cfd181..6b3453b5 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)); |