]> git.ipfire.org Git - thirdparty/nftables.git/commit
evaluate: reject: fix dependency generation from nft -f
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 6 Jan 2015 20:28:53 +0000 (21:28 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 6 Jan 2015 20:46:35 +0000 (21:46 +0100)
commit545c93d54d900e8e20071891b7e2bf3bb0e5fed2
tree29c221e7b85833935ce541b2b40c9e95f4703a71
parentc8eeefb1d33c989493bf526a53a56f1f92fb87e3
evaluate: reject: fix dependency generation from nft -f

When nft -f is used, ctx->cmd points to the table object, which
contains the corresponding chain, set and rule lists. The reject
statement evaluator relies on ctx->cmd->rule to add the payload
dependencies, which is doesn't point to the rule in that case.

This patch adds the rule context to the eval_ctx structure to update
the rule list of statements when generating dependencies, as the reject
statement needs.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=993
Reported-by: Ting-Wei Lan <lantw44@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/rule.h
src/evaluate.c