diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-04-14 13:08:18 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-04-14 13:08:18 +0300 |
| commit | 8c4796a22d196d37a94ed497eaf5dbcd1f3a93de (patch) | |
| tree | a31c3f6bb67c0e14cb571979f5778c58ae4b74e2 /lib/filter_nb.c | |
| parent | d75213d26036a2880f23f5e67cb1c890f20299de (diff) | |
lib: fix access-list deletion
Problems with the current implementation:
* Delete hook is called before the deletion of the access-list from the
master list, which means that daemons processing this hook successfully
find this access-list, store a pointer to it in their structures, and
right after that the access-list is freed. Daemons end up having stale
pointer to the freed structure.
* Route-maps are not notified of the deletion.
This commit fixes both issues.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'lib/filter_nb.c')
| -rw-r--r-- | lib/filter_nb.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/filter_nb.c b/lib/filter_nb.c index 08c29789b9..85805ffa47 100644 --- a/lib/filter_nb.c +++ b/lib/filter_nb.c @@ -508,17 +508,12 @@ static int lib_access_list_create(struct nb_cb_create_args *args) static int lib_access_list_destroy(struct nb_cb_destroy_args *args) { - struct access_master *am; struct access_list *acl; if (args->event != NB_EV_APPLY) return NB_OK; acl = nb_running_unset_entry(args->dnode); - am = acl->master; - if (am->delete_hook) - am->delete_hook(acl); - access_list_delete(acl); return NB_OK; |
