]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/shell: typeof_integer/raw: prefer @nh for payload matching
authorFlorian Westphal <fw@strlen.de>
Fri, 1 Sep 2023 12:05:05 +0000 (14:05 +0200)
committerFlorian Westphal <fw@strlen.de>
Sun, 10 Sep 2023 12:38:11 +0000 (14:38 +0200)
@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
tests/shell/testcases/maps/dumps/typeof_raw_0.nft
tests/shell/testcases/maps/typeof_integer_0
tests/shell/testcases/maps/typeof_raw_0
tests/shell/testcases/sets/dumps/typeof_raw_0.nft
tests/shell/testcases/sets/typeof_raw_0

index 330415574c95b594ecef5315b3618721571773dd..19c24febffcc5bd803251db80d7fb655c83b2a31 100644 (file)
@@ -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 }
        }
 }
index e876425b2bc62581f107a9b0380a4553eba19943..476169f2943b4ce3ea6bf785374b6b56dae18a3c 100644 (file)
@@ -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 }
        }
 }
index d51510af9073350db90f471eac8730119138a135..0deff5eef67b0582475a87de3c30dfb681ae8ad4 100755 (executable)
@@ -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 }
        }
 }"
index e3da7825cb7bfd482cd28f3cd24c4d25d90d7180..bcd2c6d8c5024f10c4383917584049dca040bdb6 100755 (executable)
@@ -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}
        }
 }"
 
index 499ff167f51de3d4b773e651532709cf3961fe8e..4d6abaaa151b690276304bd4422f35480a000806 100644 (file)
@@ -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
        }
 }
index 36396b5c2e1d862434861ff34ec998978af530f5..66042eb4085a99862211be3e530ae0b7716ea221 100755 (executable)
@@ -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
        }
 }"