summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-05-28 13:30:05 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2021-05-29 02:04:53 +0300
commit85554eb981e5a8b0b8947611193aef1737081ef2 (patch)
tree104fff4d5bf56e5e0982c889a545c16e8289fb92 /include
parent6802db48fc27b8d7f601e96a85771f2205702941 (diff)
downloadlinux-85554eb981e5a8b0b8947611193aef1737081ef2.tar.xz
netfilter: nf_tables: add and use nft_sk helper
This allows to change storage placement later on without changing readers. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/netfilter/nf_tables.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 27eeb613bb4e..af1228f58e5a 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -29,6 +29,11 @@ struct nft_pktinfo {
struct xt_action_param xt;
};
+static inline struct sock *nft_sk(const struct nft_pktinfo *pkt)
+{
+ return pkt->xt.state->sk;
+}
+
static inline struct net *nft_net(const struct nft_pktinfo *pkt)
{
return pkt->xt.state->net;