From b01efc557b411e02379c9647eebf7e762efd8473 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Fri, 2 Dec 2022 15:30:56 +0100 Subject: buffers: revert protect against bad thread indices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change was introduced to workaround a bug in the NAT code, but we should not woraround plugin bugs in infra. Type: fix Fixes: f8631ce7e8886136b4543a7926ffdf1bc760fb11 Change-Id: Id6ee281cf1fe8466b6522905fc2a176716e3d52f Signed-off-by: Benoît Ganne --- src/vlib/buffer_funcs.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/vlib/buffer_funcs.c b/src/vlib/buffer_funcs.c index 80bb30e9f93..f0e2add8457 100644 --- a/src/vlib/buffer_funcs.c +++ b/src/vlib/buffer_funcs.c @@ -261,10 +261,7 @@ vlib_get_frame_queue_elt (vlib_frame_queue_main_t *fqm, u32 index, vlib_frame_queue_t *fq; u64 nelts, tail, new_tail; - if (index >= vec_len (fqm->vlib_frame_queues)) - return 0; - - fq = fqm->vlib_frame_queues[index]; + fq = vec_elt (fqm->vlib_frame_queues, index); ASSERT (fq); nelts = fq->nelts; -- cgit 1.2.3-korg