Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d46f2cd2 authored by Patrick McHardy's avatar Patrick McHardy Committed by Pablo Neira Ayuso
Browse files

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: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent ab9da5c1
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@ struct nft_ct {
		enum nft_registers	dreg:8;
		enum nft_registers	dreg:8;
		enum nft_registers	sreg:8;
		enum nft_registers	sreg:8;
	};
	};
	uint8_t			family;
};
};


static void nft_ct_get_eval(const struct nft_expr *expr,
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)
	if (err < 0)
		return err;
		return err;


	priv->family = ctx->afi->family;

	return 0;
	return 0;
}
}


static void nft_ct_destroy(const struct nft_ctx *ctx,
static void nft_ct_destroy(const struct nft_ctx *ctx,
			   const struct nft_expr *expr)
			   const struct nft_expr *expr)
{
{
	struct nft_ct *priv = nft_expr_priv(expr);
	nft_ct_l3proto_module_put(ctx->afi->family);

	nft_ct_l3proto_module_put(priv->family);
}
}


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