aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ipsec/ipsec.c
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2016-05-01 14:52:08 -0500
committerMatthew Smith <mgsmith@netgate.com>2016-05-04 11:41:52 -0500
commit29d8510d22d05ebc73d423cc1904a4fef7123889 (patch)
tree1b057d5fed90196d9f3c6aa3073f934ef6f931fc /vnet/vnet/ipsec/ipsec.c
parent0aaf92ffbb8dd19f903c0784ea4ea6584ad6d0ee (diff)
VPP-42: VPP crashes in IPsec code when running multithreaded
Change-Id: Ib231642cfead5f5e8e45508361a11c87aad83b51 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
Diffstat (limited to 'vnet/vnet/ipsec/ipsec.c')
-rw-r--r--vnet/vnet/ipsec/ipsec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vnet/vnet/ipsec/ipsec.c b/vnet/vnet/ipsec/ipsec.c
index 47beafc32b5..ea077d0a127 100644
--- a/vnet/vnet/ipsec/ipsec.c
+++ b/vnet/vnet/ipsec/ipsec.c
@@ -492,6 +492,7 @@ ipsec_init (vlib_main_t * vm)
{
clib_error_t * error;
ipsec_main_t * im = &ipsec_main;
+ vlib_thread_main_t * tm = vlib_get_thread_main();
vlib_node_t * node;
ipsec_rand_seed();
@@ -505,6 +506,8 @@ ipsec_init (vlib_main_t * vm)
im->sa_index_by_sa_id = hash_create (0, sizeof (uword));
im->spd_index_by_sw_if_index = hash_create (0, sizeof (uword));
+ vec_validate_aligned(im->empty_buffers, tm->n_vlib_mains-1, CLIB_CACHE_LINE_BYTES);
+
node = vlib_get_node_by_name (vm, (u8 *) "error-drop");
ASSERT(node);
im->error_drop_node_index = node->index;