aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/netfilter/nft_lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netfilter/nft_lookup.c')
-rw-r--r--net/netfilter/nft_lookup.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/net/netfilter/nft_lookup.c b/net/netfilter/nft_lookup.c
index 4962d2173678..8a6116b75b5a 100644
--- a/net/netfilter/nft_lookup.c
+++ b/net/netfilter/nft_lookup.c
@@ -112,24 +112,30 @@ nla_put_failure:
return -1;
}
-static struct nft_expr_ops nft_lookup_ops __read_mostly = {
- .name = "lookup",
+static struct nft_expr_type nft_lookup_type;
+static const struct nft_expr_ops nft_lookup_ops = {
+ .type = &nft_lookup_type,
.size = NFT_EXPR_SIZE(sizeof(struct nft_lookup)),
- .owner = THIS_MODULE,
.eval = nft_lookup_eval,
.init = nft_lookup_init,
.destroy = nft_lookup_destroy,
.dump = nft_lookup_dump,
+};
+
+static struct nft_expr_type nft_lookup_type __read_mostly = {
+ .name = "lookup",
+ .ops = &nft_lookup_ops,
.policy = nft_lookup_policy,
.maxattr = NFTA_LOOKUP_MAX,
+ .owner = THIS_MODULE,
};
int __init nft_lookup_module_init(void)
{
- return nft_register_expr(&nft_lookup_ops);
+ return nft_register_expr(&nft_lookup_type);
}
void nft_lookup_module_exit(void)
{
- nft_unregister_expr(&nft_lookup_ops);
+ nft_unregister_expr(&nft_lookup_type);
}