Reset frame length after dispatch when recycling frames
authorDave Barach <[email protected]>
Thu, 29 Sep 2016 14:53:44 +0000 (10:53 -0400)
committerDamjan Marion <[email protected]>
Thu, 3 Nov 2016 16:41:25 +0000 (16:41 +0000)
Fixes a gross bug when enqueuing x->x->error-drop or similar

Change-Id: Ie1dc10371de4a265f5131b67cab7a62ed460a1fc
Signed-off-by: Dave Barach <[email protected]>
vlib/vlib/main.c

index 809abdf..eba2d45 100644 (file)
@@ -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)