From: Stefano Brivio <sbrivio@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org
Subject: [PATCH nft 0/2] Fix evaluation of anonymous sets with concatenated ranges
Date: Sun, 24 May 2020 15:00:25 +0200 [thread overview]
Message-ID: <cover.1590324033.git.sbrivio@redhat.com> (raw)
As reported by both Pablo and Phil, trying to add an anonymous set
containing a concatenated range would fail:
# nft add rule x y ip saddr . tcp dport { 192.168.2.1 . 20-30 } accept
BUG: invalid range expression type concat
nft: expression.c:1160: range_expr_value_low: Assertion `0' failed.
Aborted
# nft add rule t c ip daddr . tcp dport '{ 10.0.0.0/8 . 10-23, 192.168.1.1-192.168.3.8 . 80-443 } accept'
BUG: invalid range expression type concat
nft: expression.c:1296: range_expr_value_low: Assertion `0' failed.
Patch 1/2 fixes this, and 2/2 adds a simple test for it.
Stefano Brivio (2):
evaluate: Perform set evaluation on implicitly declared (anonymous)
sets
tests: shell: Introduce test for concatenated ranges in anonymous sets
src/evaluate.c | 5 ++++-
tests/shell/testcases/sets/0048anonymous_set_concat_0 | 7 +++++++
.../testcases/sets/dumps/0048anonymous_set_concat_0.nft | 6 ++++++
3 files changed, 17 insertions(+), 1 deletion(-)
create mode 100755 tests/shell/testcases/sets/0048anonymous_set_concat_0
create mode 100644 tests/shell/testcases/sets/dumps/0048anonymous_set_concat_0.nft
--
2.26.2
next reply other threads:[~2020-05-24 13:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-24 13:00 Stefano Brivio [this message]
2020-05-24 13:00 ` [PATCH nft 1/2] evaluate: Perform set evaluation on implicitly declared (anonymous) sets Stefano Brivio
2020-05-25 15:46 ` Phil Sutter
2020-05-26 16:54 ` Pablo Neira Ayuso
2020-05-26 17:17 ` Stefano Brivio
2020-05-26 17:34 ` Pablo Neira Ayuso
2020-05-26 18:01 ` Stefano Brivio
2020-05-26 22:04 ` Pablo Neira Ayuso
2020-05-24 13:00 ` [PATCH nft 2/2] tests: shell: Introduce test for concatenated ranges in anonymous sets Stefano Brivio
2020-05-25 15:48 ` Phil Sutter
2020-05-25 23:12 ` Stefano Brivio
2020-05-26 13:39 ` Phil Sutter
2020-05-26 17:17 ` Stefano Brivio
2020-05-25 15:45 ` [PATCH nft 0/2] Fix evaluation of anonymous sets with concatenated ranges Phil Sutter
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=cover.1590324033.git.sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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).