From: Jann Haber <jannh@selfnet.de>
To: netfilter-devel@vger.kernel.org
Cc: Jonas Burgdorf <jonas@selfnet.de>, technik@selfnet.de
Subject: Issue with counter and interval map
Date: Wed, 13 Sep 2023 19:42:01 +0200 [thread overview]
Message-ID: <f65ce9da-e780-433d-be98-44080754109e@selfnet.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1509 bytes --]
Dear nftables-developers,
at Selfnet, we have been operating our CGN based on nftables for roughly 4 years now (at that time we switched from iptables). Recently, we have upgraded our first server from Debian bullseye (Kernel 5.10, nftables 0.9.8) to bookworm (Kernel 6.1, nftables 1.0.6). On bookworm, our ruleset that works well on bullseye fails to load.
We have boiled it down to the minimal example attached, which fails to load correctly on bookworm and also on a current Arch-Linux.
xxxxx@xxxxx:~$ sudo nft -f example.conf
example.conf:5:35-48: Error: Could not process rule: No such file or directory
add element inet filter testmap { 192.168.0.0/24 : "TEST" }
^^^^^^^^^^^^^^
What we have tested:
- Removing the last line from the file and running it later manually via the command line, there is no error
- Splitting the file in two (having the final line in a separate file), the two files can be applied with two nft -f calls with no error
- When swapping the lines 3 and 4 (i.e. first add counter, then add map), there is no error applying the file
- Removing "flags: interval" from the map and testing with a single IP, there is no error applying the file
In summary, I believe our rule syntax is ok - but something is going wrong when the rules are applied in the given order atomically with "nft -f". We appreciate any insight, please also let us know if we did something wrong or if we can assist with debugging further.
Thank you and best Regards,
Jann
[-- Attachment #2: example.conf --]
[-- Type: text/plain, Size: 198 bytes --]
flush ruleset
add table inet filter
add map inet filter testmap { type ipv4_addr : counter; flags interval;}
add counter inet filter TEST
add element inet filter testmap { 192.168.0.0/24 : "TEST" }
next reply other threads:[~2023-09-13 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 17:42 Jann Haber [this message]
2023-09-13 22:52 ` Issue with counter and interval map Pablo Neira Ayuso
2023-09-15 17:51 ` Jann Haber
2023-09-16 14:40 ` 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=f65ce9da-e780-433d-be98-44080754109e@selfnet.de \
--to=jannh@selfnet.de \
--cc=jonas@selfnet.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=technik@selfnet.de \
/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.