summaryrefslogtreecommitdiffstats
path: root/src/cache.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-29 17:41:25 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-05-02 23:30:35 +0200
commitc6896c340231c00ee3f4134dcdf76f018ff20b7e (patch)
tree4caace47eda5697de55e68f23dec7e5c0baa38fc /src/cache.c
parent5ec5c706d993a68502801433c3bb2bcbb078efff (diff)
evaluate: remove chain from cache on delete chain command
Update the cache to remove this chain from the evaluation phase. Add chain_cache_del() function for this purpose. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cache.c b/src/cache.c
index 3c139f1a..a98ee595 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -278,6 +278,11 @@ void chain_cache_add(struct chain *chain, struct table *table)
cache_add(&chain->cache, &table->chain_cache, hash);
}
+void chain_cache_del(struct chain *chain)
+{
+ cache_del(&chain->cache);
+}
+
struct chain *chain_cache_find(const struct table *table, const char *name)
{
struct chain *chain;