From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Serg <seentr@at.encryp.ch>
Cc: netfilter@vger.kernel.org
Subject: Re: nftables: Internal error when checking rules
Date: Mon, 27 Mar 2023 17:05:42 +0200 [thread overview]
Message-ID: <ZCGwxl79yXfvybsk@salvia> (raw)
In-Reply-To: <4e3d7257-d89e-dad6-53d2-70adad755d7e@at.encryp.ch>
On Mon, Mar 27, 2023 at 12:10:28PM +0300, Serg wrote:
> On 3/26/23 23:45, Pablo Neira Ayuso wrote:
> > You do not have to split your elements in individual commands.
> Well, actually I need due to the arising error. My file with set elements is
> generated dynamically and it can be arbitrarily big.
>
> > Could you post some example reproducer?
>
> Sure. Steps to reproduce this issue (files are attached to this letter):
> 1) # nft -f 1_define_set.nft
> 2) # nft -f 2_fill_set.nft
> 3) # nft -cf 3_fill_set.nft
>
> On my machine it is stable to return "internal:0:0-0: Error: Could not
> process rule: File exists" error message with the nftables v1.0.6.
Thanks for the reproducer. It is a userspace bug in error reporting,
patch is here:
https://patchwork.ozlabs.org/project/netfilter-devel/patch/20230327145045.33797-1-pablo@netfilter.org/
I recommend you split that superlong line in your 2_fill_set.nft and
3_fill_set.nft files, for example:
# cat ruleset.nft
table netdev filter {
set mySet {
typeof ip saddr
flags interval
elements={
1.2.3.1/32,
1.2.6.3/32,
1.2.8.12/32,
...
}
}
}
instead of:
# cat ruleset.nft
table netdev filter {
set mySet {
typeof ip saddr
flags interval
elements={1.2.3.1/32,1.2.6.3/32,1.2.8.12/32,...
}
}
}
Now it shows this:
# nft -f ruleset.nft
ruleset.nft:402:1-16: Error: Could not process rule: File exists
8.9.10.11/30,
^^^^^^^^^^^^^
instead of the internal location.
next prev parent reply other threads:[~2023-03-27 15:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-26 9:46 nftables: Internal error when checking rules Serg
2023-03-26 15:18 ` Eric
2023-03-26 16:17 ` Serg
2023-03-26 20:45 ` Pablo Neira Ayuso
2023-03-26 20:48 ` Pablo Neira Ayuso
2023-03-27 9:10 ` Serg
2023-03-27 15:05 ` Pablo Neira Ayuso [this message]
2023-03-27 15:33 ` Serg
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=ZCGwxl79yXfvybsk@salvia \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=seentr@at.encryp.ch \
/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.