summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2020-08-12 08:24:44 +0000
committerOle Trøan <otroan@employees.org>2020-08-13 08:19:17 +0000
commitfbecd936bd40e590031ec6d7ff81c3f8827f9f18 (patch)
tree7df5414419350e6131010106a81c6249edc2c29d
parent920acd47bc23920dfd21a0bc0dedcac80f12f7f1 (diff)
acl: use the global heap when allocating the lookup context
The "ACL as a service" lookup infra is shared, so a global heap must be used. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I86894254b737392c1968b6a581b5a37590376428
-rw-r--r--src/plugins/acl/acl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c
index 7a533743406..4944ebd5e16 100644
--- a/src/plugins/acl/acl.c
+++ b/src/plugins/acl/acl.c
@@ -782,6 +782,8 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index,
*/
vec_validate_init_empty ((*pinout_lc_index_by_sw_if_index), sw_if_index,
~0);
+ /* lookup context creation is to be done in global heap */
+ void *oldheap = clib_mem_set_heap (am->vlib_main->heap_base);
if (vec_len (vec_acl_list_index) > 0)
{
u32 lc_index = (*pinout_lc_index_by_sw_if_index)[sw_if_index];
@@ -802,6 +804,7 @@ acl_interface_set_inout_acl_list (acl_main_t * am, u32 sw_if_index,
(*pinout_lc_index_by_sw_if_index)[sw_if_index] = ~0;
}
}
+ clib_mem_set_heap (oldheap);
/* ensure ACL processing is enabled/disabled as needed */
acl_interface_inout_enable_disable (am, sw_if_index, is_input,