Skip to content

Commit

Permalink
netfilter: nft_ct: remove family from struct nft_ct
Browse files Browse the repository at this point in the history
Since we have the context available during destruction again, we can
remove the family from the private structure.

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
kaber authored and ummakynes committed Mar 8, 2014
1 parent ab9da5c commit d46f2cd
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions net/netfilter/nft_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d46f2cd

Please sign in to comment.