From 40fb9d6f6bea86b812314b3c879746d957fbb769 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 7 Jun 2018 13:35:52 +0200 Subject: src: do not reset generation ID on ruleset flush If 'flush ruleset' command is done, release the cache but still keep the generation ID around. Hence, follow up calls to cache_update() will assume that cache is updated and will not perform a netlink dump. Signed-off-by: Pablo Neira Ayuso --- src/evaluate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/evaluate.c') diff --git a/src/evaluate.c b/src/evaluate.c index 27e4f611..c4ee3cc9 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -3348,7 +3348,8 @@ static int cmd_evaluate_flush(struct eval_ctx *ctx, struct cmd *cmd) switch (cmd->obj) { case CMD_OBJ_RULESET: - cache_flush(&ctx->cache->list); + cache_flush(ctx->nf_sock, ctx->cache, cmd->op, ctx->msgs, + ctx->debug_mask, ctx->octx); break; case CMD_OBJ_TABLE: /* Flushing a table does not empty the sets in the table nor remove -- cgit v1.2.3