summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/dhcp/dhcp4_proxy_error.def2
-rw-r--r--src/vnet/dhcp/dhcp4_proxy_node.c7
-rw-r--r--src/vnet/dhcp/dhcp6_ia_na_client_dp.c3
-rw-r--r--src/vnet/dhcp/dhcp6_pd_client_dp.c3
-rw-r--r--src/vnet/dhcp/dhcp6_proxy_error.def1
-rw-r--r--src/vnet/dhcp/dhcp6_proxy_node.c7
-rw-r--r--src/vnet/ip/ip6_neighbor.c3
7 files changed, 25 insertions, 1 deletions
diff --git a/src/vnet/dhcp/dhcp4_proxy_error.def b/src/vnet/dhcp/dhcp4_proxy_error.def
index adf04808fa3..f0388564e17 100644
--- a/src/vnet/dhcp/dhcp4_proxy_error.def
+++ b/src/vnet/dhcp/dhcp4_proxy_error.def
@@ -29,4 +29,4 @@ dhcp_proxy_error (OPTION_82_VSS_NOT_PROCESSED, "DHCP VSS not processed by DHCP s
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 (ALLOC_FAIL, "DHCP buffer allocation failures.")
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];
diff --git a/src/vnet/dhcp/dhcp6_ia_na_client_dp.c b/src/vnet/dhcp/dhcp6_ia_na_client_dp.c
index 5f940c33687..4b4bee77837 100644
--- a/src/vnet/dhcp/dhcp6_ia_na_client_dp.c
+++ b/src/vnet/dhcp/dhcp6_ia_na_client_dp.c
@@ -291,6 +291,9 @@ check_send_client_message (vlib_main_t * vm,
next_index = ip6_rewrite_mcast_node.index;
c0 = vlib_buffer_copy (vm, p0);
+ if (c0 == NULL)
+ return client_state->keep_sending_client_message;
+
ci0 = vlib_get_buffer_index (vm, c0);
ip = (ip6_header_t *) vlib_buffer_get_current (c0);
diff --git a/src/vnet/dhcp/dhcp6_pd_client_dp.c b/src/vnet/dhcp/dhcp6_pd_client_dp.c
index c1bf5f8844f..90ac3028107 100644
--- a/src/vnet/dhcp/dhcp6_pd_client_dp.c
+++ b/src/vnet/dhcp/dhcp6_pd_client_dp.c
@@ -292,6 +292,9 @@ check_pd_send_client_message (vlib_main_t * vm,
next_index = ip6_rewrite_mcast_node.index;
c0 = vlib_buffer_copy (vm, p0);
+ if (c0 == NULL)
+ return client_state->keep_sending_client_message;
+
ci0 = vlib_get_buffer_index (vm, c0);
ip = (ip6_header_t *) vlib_buffer_get_current (c0);
diff --git a/src/vnet/dhcp/dhcp6_proxy_error.def b/src/vnet/dhcp/dhcp6_proxy_error.def
index 55fa731766c..5a85c423c5f 100644
--- a/src/vnet/dhcp/dhcp6_proxy_error.def
+++ b/src/vnet/dhcp/dhcp6_proxy_error.def
@@ -27,3 +27,4 @@ dhcpv6_proxy_error (NO_RELAY_MESSAGE_OPTION, "DHCPv6 reply packets without relay
dhcpv6_proxy_error (BAD_SVR_FIB_OR_ADDRESS, "DHCPv6 packets not from DHCPv6 server or server FIB.")
dhcpv6_proxy_error (PKT_TOO_BIG, "DHCPv6 packets which are too big.")
dhcpv6_proxy_error (WRONG_INTERFACE_ID_OPTION, "DHCPv6 reply to invalid interface.")
+dhcpv6_proxy_error (ALLOC_FAIL, "DHCPv6 buffer allocation failures.")
diff --git a/src/vnet/dhcp/dhcp6_proxy_node.c b/src/vnet/dhcp/dhcp6_proxy_node.c
index 174548f24eb..6006f0e23c5 100644
--- a/src/vnet/dhcp/dhcp6_proxy_node.c
+++ b/src/vnet/dhcp/dhcp6_proxy_node.c
@@ -436,6 +436,13 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm,
u32 ci0;
c0 = vlib_buffer_copy (vm, b0);
+ if (c0 == NULL)
+ {
+ vlib_node_increment_counter
+ (vm, dhcpv6_proxy_to_server_node.index,
+ DHCPV6_PROXY_ERROR_ALLOC_FAIL, 1);
+ continue;
+ }
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (c0);
ci0 = vlib_get_buffer_index (vm, c0);
server = &proxy->dhcp_servers[ii];
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index 87aa581b00e..efc687a038b 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -2403,6 +2403,9 @@ check_send_rs (vlib_main_t * vm, ip6_radv_t * radv_info, f64 current_time,
next_index = ip6_rewrite_mcast_node.index;
c0 = vlib_buffer_copy (vm, p0);
+ if (c0 == 0)
+ return radv_info->keep_sending_rs;
+
ci0 = vlib_get_buffer_index (vm, c0);
f = vlib_get_frame_to_node (vm, next_index);