]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: libip6t_ah: add unit test
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 4 Sep 2012 15:02:21 +0000 (17:02 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 7 Oct 2013 14:35:47 +0000 (16:35 +0200)
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libip6t_ah.t [new file with mode: 0644]

diff --git a/extensions/libip6t_ah.t b/extensions/libip6t_ah.t
new file mode 100644 (file)
index 0000000..459e9ec
--- /dev/null
@@ -0,0 +1,14 @@
+:INPUT,FORWARD,OUTPUT
+-m ah --ahspi 0;=;OK
+-m ah --ahspi 4294967295;=;OK
+-m ah --ahspi 0:4294967295;-m ah;OK
+-m ah ! --ahspi 0;=;OK
+# ERROR: should fail: iptables -A FORWARD -t mangle -j CLASSIFY --set-class 1:-1
+# -m ah --ahres;=;OK
+# ERROR: line 7 (cannot find: ip6tables -I INPUT -m ah --ahlen 32
+# -m ah --ahlen 32;=;OK
+-m ah --ahspi -1;;FAIL
+-m ah --ahspi 4294967296;;FAIL
+-m ah --ahspi invalid;;FAIL
+-m ah --ahspi 0:invalid;;FAIL
+-m ah --ahspi;;FAIL