From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 4/4] netfilter: xtables: generate initial table on-demand
Date: Wed, 10 Feb 2010 16:32:40 +0100 [thread overview]
Message-ID: <4B72D198.7040204@trash.net> (raw)
In-Reply-To: <1265813954-13854-5-git-send-email-jengelh@medozas.de>
Jan Engelhardt wrote:
> +void *arpt_alloc_initial_table(const struct xt_table *info)
> +{
> + return xt_repldata_mk(arpt, ARPT);
I vaguely recall asking for a nicer (more pronouncable) name.
xt_alloc_initial_table() perhaps? xt_init_table()?
> static int __net_init nf_nat_rule_net_init(struct net *net)
> {
> - net->ipv4.nat_table = ipt_register_table(net, &nat_table,
> - &nat_initial_table.repl);
> + struct ipt_replace *repl = ipt_alloc_initial_table(&nat_table);
> +
Minor request: I'd prefer to have the allocation next to the NULL check
instead of in the variable definition.
> + if (repl == NULL)
> + return -ENOMEM;
> + net->ipv4.nat_table = ipt_register_table(net, &nat_table, repl);
> + kfree(repl);
> if (IS_ERR(net->ipv4.nat_table))
> return PTR_ERR(net->ipv4.nat_table);
> return 0;
next prev parent reply other threads:[~2010-02-10 15:32 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-10 14:59 static data reduction, 2010-02-10 Jan Engelhardt
2010-02-10 14:59 ` [PATCH 1/4] netfilter: xtables: compact table hook functions (1/2) Jan Engelhardt
2010-02-10 15:22 ` Patrick McHardy
2010-02-10 15:32 ` Jan Engelhardt
2010-02-10 14:59 ` [PATCH 2/4] netfilter: xtables: compact table hook functions (2/2) Jan Engelhardt
2010-02-10 15:24 ` Patrick McHardy
2010-02-10 14:59 ` [PATCH 3/4] netfilter: xtables: use xt_table for hook instantiation Jan Engelhardt
2010-02-10 15:27 ` Patrick McHardy
2010-02-10 16:05 ` Jan Engelhardt
2010-02-10 16:10 ` Patrick McHardy
2010-02-10 19:26 ` Jozsef Kadlecsik
2010-02-10 19:43 ` Jan Engelhardt
2010-02-10 19:46 ` Patrick McHardy
2010-02-10 20:09 ` Jan Engelhardt
2010-02-10 21:32 ` Jozsef Kadlecsik
2010-02-10 22:07 ` Jan Engelhardt
2010-02-10 22:10 ` Jan Engelhardt
2010-02-10 15:33 ` Patrick McHardy
2010-02-10 16:07 ` Jan Engelhardt
2010-02-10 14:59 ` [PATCH 4/4] netfilter: xtables: generate initial table on-demand Jan Engelhardt
2010-02-10 15:32 ` Patrick McHardy [this message]
2010-02-10 16:21 ` Jan Engelhardt
2010-02-10 16:25 ` Patrick McHardy
-- strict thread matches above, loose matches on Subject: below --
2010-02-10 16:51 static data reduction Jan Engelhardt
2010-02-10 16:51 ` [PATCH 4/4] netfilter: xtables: generate initial table on-demand Jan Engelhardt
2010-02-07 11:49 Stomping Static Data pull, 2010-02-07 Jan Engelhardt
2010-02-07 11:49 ` [PATCH 4/4] netfilter: xtables: generate initial table on-demand Jan Engelhardt
2009-10-10 9:22 stomping static data pull Jan Engelhardt
2009-10-10 9:22 ` [PATCH 4/4] netfilter: xtables: generate initial table on-demand Jan Engelhardt
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=4B72D198.7040204@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.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).