summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2021-04-02 20:48:00 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-04-03 19:41:02 +0200
commit5df3d66110aac43e30ff5fdb804300fe89d42e54 (patch)
treed3779f852276e074766bda9684b65b818ab4b530
parentdf48e56e987f84bb32ea53dfe98569dfe3fb7e37 (diff)
cache: bail out if chain list cannot be fetched from kernel
Do not report success if chain cache list cannot be built. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c
index 80632c86..f032171a 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -365,7 +365,7 @@ static int cache_init_objects(struct netlink_ctx *ctx, unsigned int flags)
if (flags & NFT_CACHE_CHAIN_BIT) {
chain_list = chain_cache_dump(ctx, &ret);
if (!chain_list)
- return ret;
+ return -1;
}
list_for_each_entry(table, &ctx->nft->cache.list, list) {