__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>
CMD_EXPORT,
CMD_MONITOR,
CMD_DESCRIBE,
+ __CMD_FLUSH_RULESET,
};
/**
unsigned int completeness = CMD_INVALID;
switch (cmd->obj) {
+ case CMD_OBJ_RULESET:
+ completeness = __CMD_FLUSH_RULESET;
+ break;
case CMD_OBJ_SET:
case CMD_OBJ_MAP:
case CMD_OBJ_METER:
};
int ret;
+ if (cmd == __CMD_FLUSH_RULESET)
+ return 0;
+
ret = cache_init_tables(ctx, &handle, &ctx->nft->cache);
if (ret < 0)
return ret;