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>
struct table *table;
if (ctx->table != NULL)
- return ctx->cmd->table;
+ return ctx->table;
table = table_lookup(&ctx->cmd->handle);
if (table == NULL)