ip: avoid arp assert if out of buffers (VPP-1030) 15/8815/3
authorFlorin Coras <fcoras@cisco.com>
Sat, 14 Oct 2017 18:02:37 +0000 (11:02 -0700)
committerFlorin Coras <florin.coras@gmail.com>
Sun, 15 Oct 2017 20:20:03 +0000 (20:20 +0000)
Change-Id: Ia31b978c6c1619c3e0075a84fcbbb6ccbf1c0076
Signed-off-by: Florin Coras <fcoras@cisco.com>
src/vnet/ip/ip4_forward.c

index c2a2f79..8b21869 100755 (executable)
@@ -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));