summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-03-07 19:08:32 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-03-08 12:35:19 +0100
commitd46f2cd2601d01d54fd556395483fb4032155c3b (patch)
tree84c49a7072591c5c71bd82b6ed981fb413ce4008 /net
parentab9da5c19f359f9ac2635157d9cd45deec4ef63c (diff)
downloadlinux-d46f2cd2601d01d54fd556395483fb4032155c3b.tar.gz
linux-d46f2cd2601d01d54fd556395483fb4032155c3b.tar.bz2
linux-d46f2cd2601d01d54fd556395483fb4032155c3b.zip
netfilter: nft_ct: remove family from struct nft_ct
Since we have the context available during destruction again, we can remove the family from the private structure. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nft_ct.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index 65a2c7b6a7a0..bd0d41e69341 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -24,11 +24,10 @@
struct nft_ct {
enum nft_ct_keys key:8;
enum ip_conntrack_dir dir:8;
- union{
+ union {
enum nft_registers dreg:8;
enum nft_registers sreg:8;
};
- uint8_t family;
};
static void nft_ct_get_eval(const struct nft_expr *expr,
@@ -316,17 +315,13 @@ static int nft_ct_init(const struct nft_ctx *ctx,
if (err < 0)
return err;
- priv->family = ctx->afi->family;
-
return 0;
}
static void nft_ct_destroy(const struct nft_ctx *ctx,
const struct nft_expr *expr)
{
- struct nft_ct *priv = nft_expr_priv(expr);
-
- nft_ct_l3proto_module_put(priv->family);
+ nft_ct_l3proto_module_put(ctx->afi->family);
}
static int nft_ct_get_dump(struct sk_buff *skb, const struct nft_expr *expr)