From 954c707972bf7efcd227e26d9679544813a78115 Mon Sep 17 00:00:00 2001
From: Dave Barach <dave@barachs.net>
Date: Wed, 8 Apr 2020 08:14:57 -0400
Subject: misc: check return values from vlib_buffer_copy(...)

vlib_buffer_copy(...) returns NULL if the system is temporarily out of
buffers.

This is NOT correct. Please don't be this person:

   c0 = vlib_buffer_copy (vm, p0);
   ci0 = vlib_get_buffer_index (vm, c0);

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ic25ef58965871ea5d2b40904df9506803f69e47e
---
 src/plugins/dhcp/dhcp4_proxy_error.def | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/plugins/dhcp/dhcp4_proxy_error.def')

diff --git a/src/plugins/dhcp/dhcp4_proxy_error.def b/src/plugins/dhcp/dhcp4_proxy_error.def
index 83f11830ab6..bd814e34ff8 100644
--- a/src/plugins/dhcp/dhcp4_proxy_error.def
+++ b/src/plugins/dhcp/dhcp4_proxy_error.def
@@ -30,4 +30,4 @@ dhcp_proxy_error (BAD_YIADDR, "DHCP packets with bad your_ip_address fields")
 dhcp_proxy_error (BAD_SVR_FIB_OR_ADDRESS, "DHCP packets not from DHCP server or server FIB.")
 dhcp_proxy_error (PKT_TOO_BIG, "DHCP packets which are too big.")
 dhcp_proxy_error (FOR_US, "DHCP packets for local client.")
-
+dhcp_proxy_error (ALLOC_FAIL, "DHCP buffer allocation failures.")
-- 
cgit 1.2.3-korg

