summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-09-29 10:53:44 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2016-11-03 16:41:25 +0000
commitcb4cda69125f78f556d93b67e3d345ab469d891b (patch)
tree88ea97d99d8f292ff8948a92dd677f1d67a71802
parent393252a6b1757690fb83ce744e8e63af46a64453 (diff)
Reset frame length after dispatch when recycling frames
Fixes a gross bug when enqueuing x->x->error-drop or similar Change-Id: Ie1dc10371de4a265f5131b67cab7a62ed460a1fc Signed-off-by: Dave Barach <dave@barachs.net>
-rw-r--r--vlib/vlib/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vlib/vlib/main.c b/vlib/vlib/main.c
index 809abdf5538..eba2d4535e8 100644
--- a/vlib/vlib/main.c
+++ b/vlib/vlib/main.c
@@ -1146,6 +1146,7 @@ dispatch_pending_node (vlib_main_t * vm,
nf = vec_elt_at_index (nm->next_frames, p->next_frame_index);
nf->frame_index = restore_frame_index;
nf->flags |= VLIB_FRAME_IS_ALLOCATED;
+ f->n_vectors = 0;
}
if (f->flags & VLIB_FRAME_FREE_AFTER_DISPATCH)