summaryrefslogtreecommitdiffstats
path: root/tests/shell/testcases
diff options
context:
space:
mode:
Diffstat (limited to 'tests/shell/testcases')
-rwxr-xr-xtests/shell/testcases/sets/0008create_verdict_map_025
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/shell/testcases/sets/0008create_verdict_map_0 b/tests/shell/testcases/sets/0008create_verdict_map_0
new file mode 100755
index 00000000..8ebb4509
--- /dev/null
+++ b/tests/shell/testcases/sets/0008create_verdict_map_0
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+tmpfile=$(mktemp)
+if [ ! -w $tmpfile ] ; then
+ echo "Failed to create tmp file" >&2
+ exit 0
+fi
+
+trap "rm -rf $tmpfile" EXIT # cleanup if aborted
+
+echo "
+table ip t {
+ map sourcemap {
+ type ipv4_addr : verdict;
+ }
+ chain postrouting {
+ ip saddr vmap @sourcemap accept
+ }
+}
+add chain t c
+add element t sourcemap { 100.123.10.2 : jump c }
+" > $tmpfile
+
+set -e
+$NFT -f $tmpfile