]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: shell: skip NAT netmap tests if kernel lacks support
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 7 Nov 2023 09:05:59 +0000 (10:05 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 11 Nov 2023 08:51:12 +0000 (09:51 +0100)
Skip tests that require NAT netmap support

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/shell/features/netmap.nft [new file with mode: 0644]
tests/shell/testcases/sets/0046netmap_0

diff --git a/tests/shell/features/netmap.nft b/tests/shell/features/netmap.nft
new file mode 100644 (file)
index 0000000..2580a8d
--- /dev/null
@@ -0,0 +1,8 @@
+# 3ff7ddb1353d ("netfilter: nft_nat: add netmap support")
+# v5.8-rc1~165^2~393^2
+table ip x {
+        chain y {
+              type nat hook postrouting priority srcnat; policy accept;
+              snat ip prefix to ip saddr map { 10.141.11.0/24 : 192.168.2.0/24 }
+        }
+}
index 60bda4017c5999f11bc1956a40290850d4077ad9..7533623e7f7baa90f8dc3fef98290a6897a1c39f 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/bash
 
+# NFT_TEST_REQUIRES(NFT_TEST_HAVE_netmap)
+
 EXPECTED="table ip x {
             chain y {
                     type nat hook postrouting priority srcnat; policy accept;