aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_lookup.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-11-03 10:56:26 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-11-03 11:52:34 +0100
commit0e5a1c7eb3fc705c4cc6c1e058e81d1f2e721c72 (patch)
treea86f5800f72eb0606dc38759af952acb49f8e6d7 /net/netfilter/nft_lookup.c
parentnetfilter: x_tables: move hook state into xt_action_param structure (diff)
downloadlinux-dev-0e5a1c7eb3fc705c4cc6c1e058e81d1f2e721c72.tar.xz
linux-dev-0e5a1c7eb3fc705c4cc6c1e058e81d1f2e721c72.zip
netfilter: nf_tables: use hook state from xt_action_param structure
Don't copy relevant fields from hook state structure, instead use the one that is already available in struct xt_action_param. This patch also adds a set of new wrapper functions to fetch relevant hook state structure fields. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_lookup.c')
-rw-r--r--net/netfilter/nft_lookup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/netfilter/nft_lookup.c b/net/netfilter/nft_lookup.c
index 8166b6994cc7..a8ce49bcda80 100644
--- a/net/netfilter/nft_lookup.c
+++ b/net/netfilter/nft_lookup.c
@@ -35,9 +35,8 @@ static void nft_lookup_eval(const struct nft_expr *expr,
const struct nft_set_ext *ext;
bool found;
- found = set->ops->lookup(pkt->net, set, &regs->data[priv->sreg], &ext) ^
- priv->invert;
-
+ found = set->ops->lookup(nft_net(pkt), set, &regs->data[priv->sreg],
+ &ext) ^ priv->invert;
if (!found) {
regs->verdict.code = NFT_BREAK;
return;