diff options
author | 2025-05-21 22:44:23 +0200 | |
---|---|---|
committer | 2025-05-23 13:57:12 +0200 | |
commit | e225376d78fb2d85e99a2436a9e65765dc1ac234 (patch) | |
tree | a34d6b130745fb6bbc380c9c574c65f9ef9a1e5c /include | |
parent | netfilter: nf_tables: Introduce functions freeing nft_hook objects (diff) | |
download | wireguard-linux-e225376d78fb2d85e99a2436a9e65765dc1ac234.tar.xz wireguard-linux-e225376d78fb2d85e99a2436a9e65765dc1ac234.zip |
netfilter: nf_tables: Introduce nft_hook_find_ops{,_rcu}()
Also a pretty dull wrapper around the hook->ops.dev comparison for now.
Will search the embedded nf_hook_ops list in future. The ugly cast to
eliminate the const qualifier will vanish then, too.
Since this future list will be RCU-protected, also introduce an _rcu()
variant here.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/netfilter/nf_tables.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h index 803d5f1601f9..df0b151743a2 100644 --- a/include/net/netfilter/nf_tables.h +++ b/include/net/netfilter/nf_tables.h @@ -1205,6 +1205,11 @@ struct nft_hook { u8 ifnamelen; }; +struct nf_hook_ops *nft_hook_find_ops(const struct nft_hook *hook, + const struct net_device *dev); +struct nf_hook_ops *nft_hook_find_ops_rcu(const struct nft_hook *hook, + const struct net_device *dev); + /** * struct nft_base_chain - nf_tables base chain * |