summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2019-06-07 19:21:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-06-07 23:54:51 +0200
commit9f5c65f72fd8b357b6d9e504fa3d9e8edcfa67a0 (patch)
tree60b04d85ddb18c711135015452b69d62b0be72c1
parentc1073a04697ec69b419bfb6601184f8e94509a6d (diff)
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 <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/cache.c8
1 files changed, 1 insertions, 7 deletions
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: