From: Patrick McHardy <kaber@trash.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 4/5] netfilter: nft_ct: remove family from struct nft_ct
Date: Fri, 7 Mar 2014 19:08:32 +0100 [thread overview]
Message-ID: <1394215713-32049-5-git-send-email-kaber@trash.net> (raw)
In-Reply-To: <1394215713-32049-1-git-send-email-kaber@trash.net>
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>
---
net/netfilter/nft_ct.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index 65a2c7b..bd0d41e 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)
--
1.8.5.3
next prev parent reply other threads:[~2014-03-07 18:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-07 18:08 [PATCH 0/5] netfilter: nf_tables: restore context during destruction Patrick McHardy
2014-03-07 18:08 ` [PATCH 1/5] netfilter: nf_tables: clean up nf_tables_trans_add() argument order Patrick McHardy
2014-03-07 18:08 ` [PATCH 2/5] netfilter: nf_tables: restore context for expression destructors Patrick McHardy
2014-03-07 18:08 ` [PATCH 3/5] netfilter: nf_tables: restore notifications for anonymous set destruction Patrick McHardy
2014-03-07 18:08 ` Patrick McHardy [this message]
2014-03-07 18:08 ` [PATCH 5/5] netfilter: nft_nat: fix family validation Patrick McHardy
2014-03-12 12:23 ` [PATCH 0/5] netfilter: nf_tables: restore context during destruction Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1394215713-32049-5-git-send-email-kaber@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).