aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_lookup.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-05-13 22:29:55 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-05-28 21:11:41 +0200
commit0974cff3eb66764cc86b60f1071958acc432a4e8 (patch)
tree7053d9d5aa8d8a9380d3184e955b916e60419377 /net/netfilter/nft_lookup.c
parenta58db7ad80e89dab014bd2d769c233eeca1bf519 (diff)
downloadlinux-0974cff3eb66764cc86b60f1071958acc432a4e8.tar.gz
netfilter: add and use nft_set_do_lookup helper
Followup patch will add a CONFIG_RETPOLINE wrapper to avoid the ops->lookup() indirection cost for retpoline builds. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_lookup.c')
-rw-r--r--net/netfilter/nft_lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nft_lookup.c b/net/netfilter/nft_lookup.c
index a479f8a1270cbb..1a8581879af5da 100644
--- a/net/netfilter/nft_lookup.c
+++ b/net/netfilter/nft_lookup.c
@@ -33,8 +33,8 @@ void nft_lookup_eval(const struct nft_expr *expr,
const struct net *net = nft_net(pkt);
bool found;
- found = set->ops->lookup(net, set, &regs->data[priv->sreg], &ext) ^
- priv->invert;
+ found = nft_set_do_lookup(net, set, &regs->data[priv->sreg], &ext) ^
+ priv->invert;
if (!found) {
ext = nft_set_catchall_lookup(net, set);
if (!ext) {