summaryrefslogtreecommitdiff
path: root/lib/filter.c
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2024-02-25 23:12:14 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-02-27 11:40:00 +0000
commitf9960582ee3b5fc90decbb1a56cda469e897b26e (patch)
tree6633389889ce0269cdb8cee333f6333d7f22fce1 /lib/filter.c
parent1d64549c3dfe3770e7e97626599f8421fcc1de0b (diff)
lib: fix access-list entry update
When an access-list entry is updated, current NB code calls notification hooks for each updated field. It means that when multiple fields of an entry are changed in a single commit, the hooks are run with an interim state of an access-list instead of a final one. To fix the issue, we should call the hooks once, after all fields of an entry are updated. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com> (cherry picked from commit a9460ae713a43285a972070d925ce38eaa5e363a)
Diffstat (limited to 'lib/filter.c')
-rw-r--r--lib/filter.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/filter.c b/lib/filter.c
index a0adff0e35..5a0790f8bf 100644
--- a/lib/filter.c
+++ b/lib/filter.c
@@ -410,7 +410,10 @@ void access_list_filter_add(struct access_list *access,
filter->prev = access->tail;
access->tail = filter;
}
+}
+void access_list_filter_update(struct access_list *access)
+{
/* Run hook function. */
if (access->master->add_hook)
(*access->master->add_hook)(access);