summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2019-06-14 14:16:59 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-06-14 14:35:16 +0200
commitdc5372b6e8448549a770f9d09477fd2a9207d69c (patch)
treef10fff1748da9c53f42c0fed5c707740770d99c0 /src/rule.c
parentef5c498bd166b5284fdf80d95b03daaa7e05556a (diff)
cache: do not populate the cache in case of flush ruleset command
__CMD_FLUSH_RULESET is a dummy definition that used to skip the netlink dump to populate the cache. This patch is a workaround until we have a better infrastructure to track the state of the cache objects. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rule.c b/src/rule.c
index 8de5aa62..0c0fd07e 100644
--- a/src/rule.c
+++ b/src/rule.c
@@ -210,6 +210,9 @@ static int cache_init(struct netlink_ctx *ctx, enum cmd_ops cmd)
};
int ret;
+ if (cmd == __CMD_FLUSH_RULESET)
+ return 0;
+
ret = cache_init_tables(ctx, &handle, &ctx->nft->cache);
if (ret < 0)
return ret;