summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2012-12-08 20:26:10 +0100
committerPatrick McHardy <kaber@trash.net>2012-12-08 20:26:10 +0100
commit256f41f07998ba63146897019d4282767870108d (patch)
tree4fe5969702d6f43c86163567f2441a3e00a774fc /tests
parentcf3dbf97f4b95aa876fefae3b99797e58403b874 (diff)
tests: add verdict map test
Signed-off-by: Patrick McHardy <kaber@Ƨrash.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/verdict-maps20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/verdict-maps b/tests/verdict-maps
new file mode 100644
index 00000000..25b60d19
--- /dev/null
+++ b/tests/verdict-maps
@@ -0,0 +1,20 @@
+#! nft -f
+#
+
+add table ip filter
+add chain ip filter input { hook NF_INET_LOCAL_IN 0; }
+
+add chain ip filter chain1
+add filter chain1 counter
+
+add chain ip filter chain2
+add filter chain2 counter
+
+add chain ip filter chain3
+add filter chain3 counter
+
+add filter input ip saddr vmap { \
+ 10.0.0.0/24 => jump chain1, \
+ 10.0.0.0/8 => jump chain2, \
+ 8.8.8.8 => jump chain3 \
+}