aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-06-04 12:27:06 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2021-06-07 12:23:38 +0200
commit7b4b2fa37587394fb89fa51a4bea0820a1b37a5d (patch)
tree75f08548b3079f0333a85a4daf5dfb216680fb6a /include/linux/netfilter.h
parentnetfilter: flowtable: Set offload timeouts according to proto values (diff)
downloadlinux-dev-7b4b2fa37587394fb89fa51a4bea0820a1b37a5d.tar.xz
linux-dev-7b4b2fa37587394fb89fa51a4bea0820a1b37a5d.zip
netfilter: annotate nf_tables base hook ops
This will allow a followup patch to treat the 'ops->priv' pointer as nft_chain argument without having to first walk the table/chains to check if there is a matching base chain pointer. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/linux/netfilter.h')
-rw-r--r--include/linux/netfilter.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index f161569fbe2f..3fda1a508733 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -77,12 +77,18 @@ struct nf_hook_state {
typedef unsigned int nf_hookfn(void *priv,
struct sk_buff *skb,
const struct nf_hook_state *state);
+enum nf_hook_ops_type {
+ NF_HOOK_OP_UNDEFINED,
+ NF_HOOK_OP_NF_TABLES,
+};
+
struct nf_hook_ops {
/* User fills in from here down. */
nf_hookfn *hook;
struct net_device *dev;
void *priv;
- u_int8_t pf;
+ u8 pf;
+ enum nf_hook_ops_type hook_ops_type:8;
unsigned int hooknum;
/* Hooks are ordered in ascending priority. */
int priority;