]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
evaluate: missing location for chain nested in table definition
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 22 Jul 2019 11:55:22 +0000 (13:55 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 22 Jul 2019 12:40:52 +0000 (14:40 +0200)
error reporting may crash because location is unset.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/evaluate.c

index 429b1150de5543baa21ed4fe30f520408d332189..e7f16ba6461bb5fe4eec6c6ff4b2ce68af43bcef 100644 (file)
@@ -3564,6 +3564,7 @@ static int table_evaluate(struct eval_ctx *ctx, struct table *table)
        }
        list_for_each_entry(chain, &table->chains, list) {
                handle_merge(&chain->handle, &table->handle);
+               ctx->cmd->handle.chain.location = chain->location;
                if (chain_evaluate(ctx, chain) < 0)
                        return -1;
        }