aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vnet/ip/icmp4.c10
-rw-r--r--src/vnet/ip/icmp6.c10
2 files changed, 18 insertions, 2 deletions
diff --git a/src/vnet/ip/icmp4.c b/src/vnet/ip/icmp4.c
index ce81dc04f65..500aa6d9c16 100644
--- a/src/vnet/ip/icmp4.c
+++ b/src/vnet/ip/icmp4.c
@@ -495,7 +495,6 @@ ip4_icmp_error (vlib_main_t * vm,
org_p0 = vlib_get_buffer (vm, org_pi0);
p0 = vlib_buffer_copy_no_chain (vm, org_p0, &pi0);
- vlib_buffer_free_one (vm, org_pi0);
if (!p0 || pi0 == ~0) /* Out of buffers */
continue;
@@ -575,6 +574,15 @@ ip4_icmp_error (vlib_main_t * vm,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
+ /*
+ * push the original buffers to error-drop, so that
+ * they can get the error counters handled, then freed
+ */
+ vlib_buffer_enqueue_to_single_next (vm, node,
+ vlib_frame_vector_args (frame),
+ IP4_ICMP_ERROR_NEXT_DROP,
+ frame->n_vectors);
+
return frame->n_vectors;
}
diff --git a/src/vnet/ip/icmp6.c b/src/vnet/ip/icmp6.c
index ff83a0cb946..9d283ff43f5 100644
--- a/src/vnet/ip/icmp6.c
+++ b/src/vnet/ip/icmp6.c
@@ -512,7 +512,6 @@ ip6_icmp_error (vlib_main_t * vm,
org_p0 = vlib_get_buffer (vm, org_pi0);
p0 = vlib_buffer_copy_no_chain (vm, org_p0, &pi0);
- vlib_buffer_free_one (vm, org_pi0);
if (!p0 || pi0 == ~0) /* Out of buffers */
continue;
@@ -588,6 +587,15 @@ ip6_icmp_error (vlib_main_t * vm,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
+ /*
+ * push the original buffers to error-drop, so that
+ * they can get the error counters handled, then freed
+ */
+ vlib_buffer_enqueue_to_single_next (vm, node,
+ vlib_frame_vector_args (frame),
+ IP6_ICMP_ERROR_NEXT_DROP,
+ frame->n_vectors);
+
return frame->n_vectors;
}