From: Andrew Yourtchenko Date: Mon, 14 Aug 2017 18:49:23 +0000 (+0200) Subject: acl-plugin: don't attempt to delete the ACLs on interface deletion if ACL plugin... X-Git-Tag: v17.10-rc1~228 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=e9ab1c0b4a8d9ae930fbc5522c8d56a0a7a49608 acl-plugin: don't attempt to delete the ACLs on interface deletion if ACL plugin heap is not initialized With the addition of the own heap, the delete routines called from interface deletion callback may attempt to initialize the ACL plugin heap. This is obviously not a desirable condition - so, return early from the callback if the ACL plugin heap has not been initialized yet - there is for sure nothing to clean up. Change-Id: I08a6ae725294016ff5824189ade91c288e2c473b Signed-off-by: Andrew Yourtchenko --- diff --git a/src/plugins/acl/acl.c b/src/plugins/acl/acl.c index a0057cd076b..645c6c94a2c 100644 --- a/src/plugins/acl/acl.c +++ b/src/plugins/acl/acl.c @@ -1945,6 +1945,10 @@ static clib_error_t * acl_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) { acl_main_t *am = &acl_main; + if (0 == am->acl_mheap) { + /* ACL heap is not initialized, so definitely nothing to do. */ + return 0; + } if (0 == is_add) { vlib_process_signal_event (am->vlib_main, am->fa_cleaner_node_index, ACL_FA_CLEANER_DELETE_BY_SW_IF_INDEX, sw_if_index);