Skip to contentSkip to conversation

evaluate: return ctx->table from table_lookup_global()

PATCH New Pablo Neira Ayuso 1 participant 1 message Dec 1, 2016 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 src/evaluate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/evaluate.c +1 -1
index c841aafd98a0..cf7ecb96e3b2 100644
@@ -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)
Signature · 1 line
2.1.4