aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/reass/ip4_full_reass.c5
-rw-r--r--src/vnet/ip/reass/ip4_sv_reass.c5
-rw-r--r--src/vnet/ip/reass/ip6_full_reass.c5
-rw-r--r--src/vnet/ip/reass/ip6_sv_reass.c5
4 files changed, 12 insertions, 8 deletions
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index b1d8a56fb93..94136ff487c 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -1233,7 +1233,10 @@ ip4_full_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
/* bi0 might have been updated by reass_finalize, reload */
b0 = vlib_get_buffer (vm, bi0);
- b0->error = node->errors[error0];
+ if (IP4_ERROR_NONE != error0)
+ {
+ b0->error = node->errors[error0];
+ }
if (next0 == IP4_FULL_REASS_NEXT_HANDOFF)
{
diff --git a/src/vnet/ip/reass/ip4_sv_reass.c b/src/vnet/ip/reass/ip4_sv_reass.c
index 29877cf5dfd..9b6116c9778 100644
--- a/src/vnet/ip/reass/ip4_sv_reass.c
+++ b/src/vnet/ip/reass/ip4_sv_reass.c
@@ -504,6 +504,7 @@ ip4_sv_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{
next0 = IP4_SV_REASSEMBLY_NEXT_DROP;
error0 = IP4_ERROR_REASS_MALFORMED_PACKET;
+ b0->error = node->errors[error0];
goto packet_enqueue;
}
ip4_sv_reass_kv_t kv;
@@ -532,6 +533,7 @@ ip4_sv_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
{
next0 = IP4_SV_REASSEMBLY_NEXT_DROP;
error0 = IP4_ERROR_REASS_LIMIT_REACHED;
+ b0->error = node->errors[error0];
goto packet_enqueue;
}
@@ -556,7 +558,6 @@ ip4_sv_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
reass->tcp_seq_number;
vnet_buffer (b0)->ip.reass.l4_src_port = reass->l4_src_port;
vnet_buffer (b0)->ip.reass.l4_dst_port = reass->l4_dst_port;
- error0 = IP4_ERROR_NONE;
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
ip4_sv_reass_add_trace (vm, node, rm, reass, bi0,
@@ -644,8 +645,6 @@ ip4_sv_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
goto next_packet;
packet_enqueue:
- b0->error = node->errors[error0];
-
to_next[0] = bi0;
to_next += 1;
n_left_to_next -= 1;
diff --git a/src/vnet/ip/reass/ip6_full_reass.c b/src/vnet/ip/reass/ip6_full_reass.c
index 7d6a31e170a..ff3475a38d7 100644
--- a/src/vnet/ip/reass/ip6_full_reass.c
+++ b/src/vnet/ip/reass/ip6_full_reass.c
@@ -1208,7 +1208,10 @@ ip6_full_reassembly_inline (vlib_main_t * vm,
/* bi0 might have been updated by reass_finalize, reload */
b0 = vlib_get_buffer (vm, bi0);
- b0->error = node->errors[error0];
+ if (IP6_ERROR_NONE != error0)
+ {
+ b0->error = node->errors[error0];
+ }
if (next0 == IP6_FULL_REASSEMBLY_NEXT_HANDOFF)
{
diff --git a/src/vnet/ip/reass/ip6_sv_reass.c b/src/vnet/ip/reass/ip6_sv_reass.c
index b928bb0e01f..e026597ea7b 100644
--- a/src/vnet/ip/reass/ip6_sv_reass.c
+++ b/src/vnet/ip/reass/ip6_sv_reass.c
@@ -556,6 +556,7 @@ ip6_sv_reassembly_inline (vlib_main_t * vm,
&(vnet_buffer (b0)->ip.reass.tcp_seq_number)))
{
error0 = IP6_ERROR_REASS_UNSUPP_IP_PROTO;
+ b0->error = node->errors[error0];
next0 = IP6_SV_REASSEMBLY_NEXT_DROP;
goto packet_enqueue;
}
@@ -623,6 +624,7 @@ ip6_sv_reassembly_inline (vlib_main_t * vm,
{
next0 = IP6_SV_REASSEMBLY_NEXT_DROP;
error0 = IP6_ERROR_REASS_LIMIT_REACHED;
+ b0->error = node->errors[error0];
goto packet_enqueue;
}
@@ -640,7 +642,6 @@ ip6_sv_reassembly_inline (vlib_main_t * vm,
vnet_buffer (b0)->ip.reass.l4_src_port = reass->l4_src_port;
vnet_buffer (b0)->ip.reass.l4_dst_port = reass->l4_dst_port;
next0 = IP6_SV_REASSEMBLY_NEXT_INPUT;
- error0 = IP6_ERROR_NONE;
if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
{
ip6_sv_reass_add_trace (vm, node, rm, reass, bi0,
@@ -680,8 +681,6 @@ ip6_sv_reassembly_inline (vlib_main_t * vm,
break;
}
- b0->error = node->errors[error0];
-
if (reass->is_complete)
{
u32 idx;