From: Florian Westphal <fw@strlen.de>
To: Shaun Brady <brady.1345@gmail.com>
Cc: netfilter-devel@vger.kernel.org, ppwaskie@kernel.org, fw@strlen.de
Subject: Re: [PATCH v2] netfilter: nf_tables: Implement jump limit for nft_table_validate
Date: Fri, 9 May 2025 15:36:56 +0200 [thread overview]
Message-ID: <20250509133656.GA16703@breakpoint.cc> (raw)
In-Reply-To: <20250506024900.1568391-1-brady.1345@gmail.com>
Shaun Brady <brady.1345@gmail.com> wrote:
> + if (!net_eq(net, &init_net)) {
> + list_for_each_entry(sibling_table, &nft_net->tables, list) {
> + if (sibling_table == table) /* ourselves */
> + continue;
> + if (sibling_table->family == table->family ||
> + sibling_table->family == NFPROTO_NETDEV){
You will also need to handle the NFPROTO_INET pseudo-family, those
register hooks for both NFPROTO_IPV4 and NFPROTO_IPV6 internally.
Perhaps a selftest script would also be good to have.
(tools/testing/selftests/net/netfilter/).
> static int __net_init nf_tables_init_net(struct net *net)
> {
> struct nftables_pernet *nft_net = nft_pernet(net);
> @@ -12003,6 +12109,10 @@ static int __init nf_tables_module_init(void)
> if (err < 0)
> return err;
>
> + err = register_pernet_subsys(&nf_limit_control_net_ops);
> + if (err < 0)
> + return err;
> +
Why does this need a new pernet subsys? Can't you hook into &nf_tables_net_ops ?
Other than this I think the patch looks good.
prev parent reply other threads:[~2025-05-09 13:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-06 2:49 [PATCH v2] netfilter: nf_tables: Implement jump limit for nft_table_validate Shaun Brady
2025-05-09 9:27 ` kernel test robot
2025-05-09 13:36 ` Florian Westphal [this message]
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=20250509133656.GA16703@breakpoint.cc \
--to=fw@strlen.de \
--cc=brady.1345@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=ppwaskie@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.