summaryrefslogtreecommitdiffstats
path: root/src/vnet/dhcp/dhcp4_proxy_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/dhcp/dhcp4_proxy_node.c')
-rw-r--r--src/vnet/dhcp/dhcp4_proxy_node.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/dhcp/dhcp4_proxy_node.c b/src/vnet/dhcp/dhcp4_proxy_node.c
index 3576f0cbf35..7f03df486d2 100644
--- a/src/vnet/dhcp/dhcp4_proxy_node.c
+++ b/src/vnet/dhcp/dhcp4_proxy_node.c
@@ -358,6 +358,13 @@ dhcp_proxy_to_server_input (vlib_main_t * vm,
u32 ci0;
c0 = vlib_buffer_copy (vm, b0);
+ if (c0 == NULL)
+ {
+ vlib_node_increment_counter
+ (vm, dhcp_proxy_to_server_node.index,
+ DHCP_PROXY_ERROR_ALLOC_FAIL, 1);
+ continue;
+ }
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (c0);
ci0 = vlib_get_buffer_index (vm, c0);
server = &proxy->dhcp_servers[ii];