aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/bier/bier_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/bier/bier_lookup.c')
-rw-r--r--src/vnet/bier/bier_lookup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/bier/bier_lookup.c b/src/vnet/bier/bier_lookup.c
index a9fab9c80f1..9361845c992 100644
--- a/src/vnet/bier/bier_lookup.c
+++ b/src/vnet/bier/bier_lookup.c
@@ -147,10 +147,9 @@ bier_lookup (vlib_main_t * vm,
memcpy(bbs.bbs_buckets, bh0->bh_bit_string, bbs.bbs_len);
/*
- * reset the fmask and clone storage vectors
+ * reset the fmask storage vector
*/
vec_reset_length (blm->blm_fmasks[thread_index]);
- vec_reset_length (blm->blm_clones[thread_index]);
/*
* Loop through the buckets in the header
@@ -225,7 +224,9 @@ bier_lookup (vlib_main_t * vm,
n_clones,
VLIB_BUFFER_CLONE_HEAD_SIZE);
- if (num_cloned != vec_len(blm->blm_fmasks[thread_index]))
+ vec_set_len(blm->blm_clones[thread_index], num_cloned);
+
+ if (num_cloned != n_clones)
{
vlib_node_increment_counter
(vm, node->node_index,