From 9f5c65f72fd8b357b6d9e504fa3d9e8edcfa67a0 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Fri, 7 Jun 2019 19:21:17 +0200 Subject: cache: Fix evaluation for rules with index reference After parsing input, rule location data (index or handle) is contained in cmd->handle, not yet in cmd->rule->handle. Fixes: 7df42800cf89e ("src: single cache_update() call to build cache before evaluation") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso --- src/cache.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/cache.c b/src/cache.c index 2a0f04d1..532ef425 100644 --- a/src/cache.c +++ b/src/cache.c @@ -24,13 +24,7 @@ static unsigned int evaluate_cache_add(struct cmd *cmd) completeness = cmd->op; break; case CMD_OBJ_RULE: - /* XXX index is set to zero unless this handle_merge() call is - * invoked, this handle_merge() call is done from the - * evaluation, which is too late. - */ - handle_merge(&cmd->rule->handle, &cmd->handle); - - if (cmd->rule->handle.index.id) + if (cmd->handle.index.id) completeness = CMD_LIST; break; default: -- cgit v1.2.3