summaryrefslogtreecommitdiffstats
path: root/include/net/netfilter/nf_tables.h
diff options
context:
space:
mode:
authorPatrick McHardy2014-01-03 13:16:14 +0100
committerPablo Neira Ayuso2014-01-07 23:50:43 +0100
commitc9484874e7596d6c890e4130336f5379f6a59c5f (patch)
tree137a798b9c7b87f4a817d22c795a22614f03be42 /include/net/netfilter/nf_tables.h
parentnetfilter: nf_tables: make chain types override the default AF functions (diff)
downloadkernel-qcow2-linux-c9484874e7596d6c890e4130336f5379f6a59c5f.tar.gz
kernel-qcow2-linux-c9484874e7596d6c890e4130336f5379f6a59c5f.tar.xz
kernel-qcow2-linux-c9484874e7596d6c890e4130336f5379f6a59c5f.zip
netfilter: nf_tables: add hook ops to struct nft_pktinfo
Multi-family tables need the AF from the hook ops. Add a pointer to the hook ops and replace usage of the hooknum member in struct nft_pktinfo. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net/netfilter/nf_tables.h')
-rw-r--r--include/net/netfilter/nf_tables.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 5a91abfc0c30..c9e63167f9a2 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -13,7 +13,7 @@ struct nft_pktinfo {
struct sk_buff *skb;
const struct net_device *in;
const struct net_device *out;
- u8 hooknum;
+ const struct nf_hook_ops *ops;
u8 nhoff;
u8 thoff;
/* for x_tables compatibility */
@@ -29,7 +29,8 @@ static inline void nft_set_pktinfo(struct nft_pktinfo *pkt,
pkt->skb = skb;
pkt->in = pkt->xt.in = in;
pkt->out = pkt->xt.out = out;
- pkt->hooknum = pkt->xt.hooknum = ops->hooknum;
+ pkt->ops = ops;
+ pkt->xt.hooknum = ops->hooknum;
pkt->xt.family = ops->pf;
}