]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests: add verdict map test
authorPatrick McHardy <kaber@trash.net>
Sat, 8 Dec 2012 19:26:10 +0000 (20:26 +0100)
committerPatrick McHardy <kaber@trash.net>
Sat, 8 Dec 2012 19:26:10 +0000 (20:26 +0100)
Signed-off-by: Patrick McHardy <kaber@ŧrash.net>
tests/verdict-maps [new file with mode: 0644]

diff --git a/tests/verdict-maps b/tests/verdict-maps
new file mode 100644 (file)
index 0000000..25b60d1
--- /dev/null
@@ -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 \
+}