Skip to content

Commit d46f2cd

Browse files
kaberummakynes
authored andcommitted
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>
1 parent ab9da5c commit d46f2cd

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎net/netfilter/nft_ct.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@
2424
struct nft_ct {
2525
enum nft_ct_keys key:8;
2626
enum ip_conntrack_dir dir:8;
27-
union{
27+
union {
2828
enum nft_registers dreg:8;
2929
enum nft_registers sreg:8;
3030
};
31-
uint8_t family;
3231
};
3332

3433
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,
316315
if (err < 0)
317316
return err;
318317

319-
priv->family = ctx->afi->family;
320-
321318
return 0;
322319
}
323320

324321
static void nft_ct_destroy(const struct nft_ctx *ctx,
325322
const struct nft_expr *expr)
326323
{
327-
struct nft_ct *priv = nft_expr_priv(expr);
328-
329-
nft_ct_l3proto_module_put(priv->family);
324+
nft_ct_l3proto_module_put(ctx->afi->family);
330325
}
331326

332327
static int nft_ct_get_dump(struct sk_buff *skb, const struct nft_expr *expr)

0 commit comments

Comments
 (0)