From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nf-next,v5 7/7] netfilter: nf_tables: remove artificial cap on maximum number of netdevices
Date: Thu, 20 Apr 2023 18:56:03 +0200 [thread overview]
Message-ID: <20230420165603.43876-7-pablo@netfilter.org> (raw)
In-Reply-To: <20230420165603.43876-1-pablo@netfilter.org>
Remove NFT_NETDEVICE_MAX (256) artificial cap on the maximum number of
netdevices that are allowed per chain/flowtable.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
v5: no changes.
include/net/netfilter/nf_tables.h | 2 --
net/netfilter/nf_tables_api.c | 8 +-------
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index 262dc17d2c0b..552e19ba4f43 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1344,8 +1344,6 @@ struct nft_object_ops {
int nft_register_obj(struct nft_object_type *obj_type);
void nft_unregister_obj(struct nft_object_type *obj_type);
-#define NFT_NETDEVICE_MAX 256
-
/**
* struct nft_flowtable - nf_tables flow table
*
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index e5937c4f9cc2..3db168527db6 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1978,7 +1978,7 @@ static int nf_tables_parse_netdev_hooks(struct net *net,
{
struct nft_hook *hook, *next;
const struct nlattr *tmp;
- int rem, n = 0, err;
+ int rem, err;
nla_for_each_nested(tmp, attr, rem) {
if (nla_type(tmp) != NFTA_DEVICE_NAME) {
@@ -1999,12 +1999,6 @@ static int nf_tables_parse_netdev_hooks(struct net *net,
goto err_hook;
}
list_add_tail(&hook->list, hook_list);
- n++;
-
- if (n == NFT_NETDEVICE_MAX) {
- err = -EFBIG;
- goto err_hook;
- }
}
return 0;
--
2.30.2
prev parent reply other threads:[~2023-04-20 17:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-20 16:55 [PATCH nf-next,v5 1/7] netfilter: nf_tables: extended netlink error reporting for netdevice Pablo Neira Ayuso
2023-04-20 16:55 ` [PATCH nf-next,v5 2/7] netfilter: nf_tables: do not send complete notification of deletions Pablo Neira Ayuso
2023-04-20 16:55 ` [PATCH nf-next,v5 3/7] netfilter: nf_tables: rename function to destroy hook list Pablo Neira Ayuso
2023-04-20 16:56 ` [PATCH nf-next,v5 4/7] netfilter: nf_tables: support for adding new devices to an existing netdev chain Pablo Neira Ayuso
2023-04-20 16:56 ` [PATCH nf-next,v5 5/7] netfilter: nf_tables: support for deleting devices in " Pablo Neira Ayuso
2023-04-20 16:56 ` [PATCH nf-next,v5 6/7] netfilter: nf_tables: allow to create netdev chain without device Pablo Neira Ayuso
2023-04-20 16:56 ` Pablo Neira Ayuso [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=20230420165603.43876-7-pablo@netfilter.org \
--to=pablo@netfilter.org \
--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