netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netfilter-devel@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH nft 3/5] tests: shell: typeof_integer/raw: prefer @nh for payload matching
Date: Mon,  4 Sep 2023 11:06:32 +0200	[thread overview]
Message-ID: <20230904090640.3015-4-fw@strlen.de> (raw)
In-Reply-To: <20230904090640.3015-1-fw@strlen.de>

@ih fails on kernels where payload expression doesn't support the 'inner'
base offset.

This test isn't about inner headers, so just use @nh which is
universally available.

Signed-off-by: Florian Westphal <fw@strlen.de>
---
 tests/shell/testcases/maps/dumps/typeof_integer_0.nft | 4 ++--
 tests/shell/testcases/maps/dumps/typeof_raw_0.nft     | 4 ++--
 tests/shell/testcases/maps/typeof_integer_0           | 4 ++--
 tests/shell/testcases/maps/typeof_raw_0               | 4 ++--
 tests/shell/testcases/sets/dumps/typeof_raw_0.nft     | 4 ++--
 tests/shell/testcases/sets/typeof_raw_0               | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/shell/testcases/maps/dumps/typeof_integer_0.nft b/tests/shell/testcases/maps/dumps/typeof_integer_0.nft
index 330415574c95..19c24febffcc 100644
--- a/tests/shell/testcases/maps/dumps/typeof_integer_0.nft
+++ b/tests/shell/testcases/maps/dumps/typeof_integer_0.nft
@@ -13,8 +13,8 @@ table inet t {
 	}
 
 	chain c {
-		udp length . @ih,32,32 vmap @m1
-		udp length . @ih,32,32 vmap @m2
+		udp length . @nh,32,32 vmap @m1
+		udp length . @nh,32,32 vmap @m2
 		udp length . @th,160,128 vmap { 47-63 . 0xe373135363130333131303735353203 : accept }
 	}
 }
diff --git a/tests/shell/testcases/maps/dumps/typeof_raw_0.nft b/tests/shell/testcases/maps/dumps/typeof_raw_0.nft
index e876425b2bc6..476169f2943b 100644
--- a/tests/shell/testcases/maps/dumps/typeof_raw_0.nft
+++ b/tests/shell/testcases/maps/dumps/typeof_raw_0.nft
@@ -7,7 +7,7 @@ table ip x {
 	}
 
 	chain y {
-		ip saddr . @ih,32,32 vmap @y
-		ip saddr . @ih,32,32 vmap { 4.4.4.4 . 0x34 : accept, 5.5.5.5 . 0x45 : drop }
+		ip saddr . @nh,32,32 vmap @y
+		ip saddr . @nh,32,32 vmap { 4.4.4.4 . 0x34 : accept, 5.5.5.5 . 0x45 : drop }
 	}
 }
diff --git a/tests/shell/testcases/maps/typeof_integer_0 b/tests/shell/testcases/maps/typeof_integer_0
index d51510af9073..0deff5eef67b 100755
--- a/tests/shell/testcases/maps/typeof_integer_0
+++ b/tests/shell/testcases/maps/typeof_integer_0
@@ -13,8 +13,8 @@ EXPECTED="table inet t {
 	}
 
 	chain c {
-		udp length . @ih,32,32 vmap @m1
-		udp length . @ih,32,32 vmap @m2
+		udp length . @nh,32,32 vmap @m1
+		udp length . @nh,32,32 vmap @m2
 		udp length . @th,160,128 vmap { 47-63 . 0xe373135363130333131303735353203 : accept }
 	}
 }"
diff --git a/tests/shell/testcases/maps/typeof_raw_0 b/tests/shell/testcases/maps/typeof_raw_0
index e3da7825cb7b..bcd2c6d8c502 100755
--- a/tests/shell/testcases/maps/typeof_raw_0
+++ b/tests/shell/testcases/maps/typeof_raw_0
@@ -7,8 +7,8 @@ EXPECTED="table ip x {
 	}
 
 	chain y {
-		ip saddr . @ih,32,32 vmap @y
-		ip saddr . @ih,32,32 vmap { 4.4.4.4 . 0x34 : accept, 5.5.5.5 . 0x45 : drop}
+		ip saddr . @nh,32,32 vmap @y
+		ip saddr . @nh,32,32 vmap { 4.4.4.4 . 0x34 : accept, 5.5.5.5 . 0x45 : drop}
 	}
 }"
 
diff --git a/tests/shell/testcases/sets/dumps/typeof_raw_0.nft b/tests/shell/testcases/sets/dumps/typeof_raw_0.nft
index 499ff167f51d..4d6abaaa151b 100644
--- a/tests/shell/testcases/sets/dumps/typeof_raw_0.nft
+++ b/tests/shell/testcases/sets/dumps/typeof_raw_0.nft
@@ -6,7 +6,7 @@ table inet t {
 	}
 
 	chain y {
-		ip saddr . @ih,32,32 { 1.1.1.1 . 0x14, 2.2.2.2 . 0x1e }
-		ip daddr . @ih,32,32 @y
+		ip saddr . @nh,32,32 { 1.1.1.1 . 0x14, 2.2.2.2 . 0x1e }
+		ip daddr . @nh,32,32 @y
 	}
 }
diff --git a/tests/shell/testcases/sets/typeof_raw_0 b/tests/shell/testcases/sets/typeof_raw_0
index 36396b5c2e1d..66042eb4085a 100755
--- a/tests/shell/testcases/sets/typeof_raw_0
+++ b/tests/shell/testcases/sets/typeof_raw_0
@@ -7,8 +7,8 @@ EXPECTED="table inet t {
 	}
 
 	chain y {
-		ip saddr . @ih,32,32 { 1.1.1.1 . 0x14, 2.2.2.2 . 0x1e }
-		ip daddr . @ih,32,32 @y
+		ip saddr . @nh,32,32 { 1.1.1.1 . 0x14, 2.2.2.2 . 0x1e }
+		ip daddr . @nh,32,32 @y
 	}
 }"
 
-- 
2.41.0


  parent reply	other threads:[~2023-09-04  9:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-04  9:06 [PATCH nft 0/5] tests: shell: add and use feature probing Florian Westphal
2023-09-04  9:06 ` [PATCH nft 1/5] tests: add " Florian Westphal
2023-09-05 13:00   ` Phil Sutter
2023-09-05 13:44     ` Florian Westphal
2023-09-05 14:01       ` Phil Sutter
2023-09-05 14:09         ` Florian Westphal
2023-09-05 20:28           ` Phil Sutter
2023-09-06  5:17     ` Thomas Haller
2023-09-06 14:36   ` Thomas Haller
2023-09-04  9:06 ` [PATCH nft 2/5] tests: shell: let netdev_chain_0 test indicate SKIP if kernel requires netdev device Florian Westphal
2023-09-05 13:03   ` Phil Sutter
2023-09-06 13:42   ` Thomas Haller
2023-09-04  9:06 ` Florian Westphal [this message]
2023-09-04  9:06 ` [PATCH nft 4/5] tests: shell: add and use feature probe for map query like a set Florian Westphal
2023-09-06 14:39   ` Thomas Haller
2023-09-04  9:06 ` [PATCH nft 5/5] tests: shell skip inner matching tests if unsupported Florian Westphal

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=20230904090640.3015-4-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    /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).