summaryrefslogtreecommitdiffstats
path: root/src/evaluate.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-12-01 11:32:58 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-12-01 12:32:42 +0100
commit0a47216feab142ec56e7351b68cb33504615c4fd (patch)
tree87c9afb3b6736562565b762c799684bdd29715f4 /src/evaluate.c
parent530a82a72d157fbe297be62c9317649d63390c7b (diff)
evaluate: return ctx->table from table_lookup_global()
Instead of returning ctx->cmd->table. Note that ctx->cmd->table and ctx->table points to the same object when all commands are embedded into the table definition. But this is not true if we mix table definitions with linear list commands in one file that we load via nft -f. Reported-by: Martin Bednar <martin@serafean.cz> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r--src/evaluate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index c75c1407..e11a455a 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -140,7 +140,7 @@ static struct table *table_lookup_global(struct eval_ctx *ctx)
struct table *table;
if (ctx->table != NULL)
- return ctx->cmd->table;
+ return ctx->table;
table = table_lookup(&ctx->cmd->handle);
if (table == NULL)