diff options
author | Patrick McHardy <kaber@trash.net> | 2014-01-03 12:16:14 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2014-01-07 23:50:43 +0100 |
commit | c9484874e7596d6c890e4130336f5379f6a59c5f (patch) | |
tree | 137a798b9c7b87f4a817d22c795a22614f03be42 /include/net/netfilter | |
parent | 3b088c4bc0035da662faa81818ba217e34c4bba4 (diff) | |
download | linux-stable-c9484874e7596d6c890e4130336f5379f6a59c5f.tar.gz linux-stable-c9484874e7596d6c890e4130336f5379f6a59c5f.tar.bz2 linux-stable-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')
-rw-r--r-- | include/net/netfilter/nf_tables.h | 5 |
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; } |