summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2021-12-03 17:12:17 +0100
committerFlorian Westphal <fw@strlen.de>2021-12-09 11:12:32 +0100
commiteb813692a3068a89748b568a98aa926ad83c1a61 (patch)
treef1c1df522c772277c139151341d6954678b47f15 /tests/shell/testcases
parent7b81d9cb094ffa96ad821528cf19269dc348f617 (diff)
tests: add shift+and typeof test cases
These tests work, but I omitted a few lines that do not: in: frag frag-off @s4 accept in: ip version @s8 out: (frag unknown & 0xfff8 [invalid type]) >> 3 == @s4 out: (ip l4proto & pfsync) >> 4 == @s8 Next patches resolve this. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/testcases')
-rw-r--r--tests/shell/testcases/sets/dumps/typeof_sets_0.nft15
-rwxr-xr-xtests/shell/testcases/sets/typeof_sets_014
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/dumps/typeof_sets_0.nft b/tests/shell/testcases/sets/dumps/typeof_sets_0.nft
index 8f11b110..ad442713 100644
--- a/tests/shell/testcases/sets/dumps/typeof_sets_0.nft
+++ b/tests/shell/testcases/sets/dumps/typeof_sets_0.nft
@@ -34,6 +34,17 @@ table inet t {
elements = { 1, 4 }
}
+ set s8 {
+ typeof ip version
+ elements = { 4, 6 }
+ }
+
+ set s9 {
+ typeof ip hdrlength
+ elements = { 0, 1, 2, 3, 4,
+ 15 }
+ }
+
chain c1 {
osf name @s1 accept
}
@@ -53,4 +64,8 @@ table inet t {
chain c7 {
sctp chunk init num-inbound-streams @s7 accept
}
+
+ chain c9 {
+ ip hdrlength @s9 accept
+ }
}
diff --git a/tests/shell/testcases/sets/typeof_sets_0 b/tests/shell/testcases/sets/typeof_sets_0
index 1e99e298..2102789e 100755
--- a/tests/shell/testcases/sets/typeof_sets_0
+++ b/tests/shell/testcases/sets/typeof_sets_0
@@ -40,6 +40,16 @@ EXPECTED="table inet t {
elements = { 1, 4 }
}
+ set s8 {
+ typeof ip version
+ elements = { 4, 6 }
+ }
+
+ set s9 {
+ typeof ip hdrlength
+ elements = { 0, 1, 2, 3, 4, 15 }
+ }
+
chain c1 {
osf name @s1 accept
}
@@ -59,6 +69,10 @@ EXPECTED="table inet t {
chain c7 {
sctp chunk init num-inbound-streams @s7 accept
}
+
+ chain c9 {
+ ip hdrlength @s9 accept
+ }
}"
set -e