summaryrefslogtreecommitdiffstats
path: root/src/vnet/crypto/node.c
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2021-09-08 16:26:52 +0200
committerFlorin Coras <florin.coras@gmail.com>2021-09-09 22:22:53 +0000
commit10bb21fb13aa74dcb0c2c0841d41a698bb274fbe (patch)
treedc96db1f8982973629ddbcacb75dd8e2ba24aaa3 /src/vnet/crypto/node.c
parent2ac5c11cd32795ec917ff038262aee113d9e792a (diff)
vlib: fix vlib_buffer_enqueue_to_next() overflow
vlib_buffer_enqueue_to_next() requires to allow overflow of up to 63 elements of 'buffer' and 'nexts' array. - add helper to compute the minimum size - fix occurences in session and async crypto Type: fix Change-Id: If8d7eebc5bf9beba71ba194aec0f79b8eb6d5843 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/crypto/node.c')
-rw-r--r--src/vnet/crypto/node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/crypto/node.c b/src/vnet/crypto/node.c
index 7f34ec10fff..e753f1ad1db 100644
--- a/src/vnet/crypto/node.c
+++ b/src/vnet/crypto/node.c
@@ -114,8 +114,8 @@ crypto_dequeue_frame (vlib_main_t * vm, vlib_node_runtime_t * node,
n_cache += cf->n_elts;
if (n_cache >= VLIB_FRAME_SIZE)
{
- vlib_buffer_enqueue_to_next (vm, node, ct->buffer_indices,
- ct->nexts, n_cache);
+ vlib_buffer_enqueue_to_next_vec (vm, node, &ct->buffer_indices,
+ &ct->nexts, n_cache);
n_cache = 0;
}
@@ -168,8 +168,8 @@ VLIB_NODE_FN (crypto_dispatch_node) (vlib_main_t * vm,
}
/* *INDENT-ON* */
if (n_cache)
- vlib_buffer_enqueue_to_next (vm, node, ct->buffer_indices, ct->nexts,
- n_cache);
+ vlib_buffer_enqueue_to_next_vec (vm, node, &ct->buffer_indices, &ct->nexts,
+ n_cache);
return n_dispatched;
}