netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 2/2] tests: shell: Introduce test for concatenated ranges in anonymous sets
Date: Sun, 24 May 2020 15:00:27 +0200	[thread overview]
Message-ID: <5735155a0e98738cdc5507385d6225e05c225465.1590324033.git.sbrivio@redhat.com> (raw)
In-Reply-To: <cover.1590324033.git.sbrivio@redhat.com>

Add a simple anonymous set including a concatenated range and check
it's inserted correctly. This is roughly based on the existing
0025_anonymous_set_0 test case.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 tests/shell/testcases/sets/0048anonymous_set_concat_0      | 7 +++++++
 .../testcases/sets/dumps/0048anonymous_set_concat_0.nft    | 6 ++++++
 2 files changed, 13 insertions(+)
 create mode 100755 tests/shell/testcases/sets/0048anonymous_set_concat_0
 create mode 100644 tests/shell/testcases/sets/dumps/0048anonymous_set_concat_0.nft

diff --git a/tests/shell/testcases/sets/0048anonymous_set_concat_0 b/tests/shell/testcases/sets/0048anonymous_set_concat_0
new file mode 100755
index 000000000000..fab61231d0c0
--- /dev/null
+++ b/tests/shell/testcases/sets/0048anonymous_set_concat_0
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+#
+# 0048anonymous_sets_concat_0 - Anonymous sets with concatenated ranges
+
+${NFT} add table t
+${NFT} add chain t c '{ type filter hook forward priority 0 ; }'
+${NFT} add rule t c 'ip daddr . tcp dport { 192.0.2.1 . 49152-65535 }'
diff --git a/tests/shell/testcases/sets/dumps/0048anonymous_set_concat_0.nft b/tests/shell/testcases/sets/dumps/0048anonymous_set_concat_0.nft
new file mode 100644
index 000000000000..c54ffae9d6d2
--- /dev/null
+++ b/tests/shell/testcases/sets/dumps/0048anonymous_set_concat_0.nft
@@ -0,0 +1,6 @@
+table ip t {
+	chain c {
+		type filter hook forward priority filter; policy accept;
+		ip daddr . tcp dport { 192.0.2.1 . 49152-65535 }
+	}
+}
-- 
2.26.2


  parent 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 [PATCH nft 0/2] Fix evaluation of anonymous sets with concatenated ranges Stefano Brivio
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 ` Stefano Brivio [this message]
2020-05-25 15:48   ` [PATCH nft 2/2] tests: shell: Introduce test for concatenated ranges in anonymous sets 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=5735155a0e98738cdc5507385d6225e05c225465.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).