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

diff --git a/extensions/libxt_CT.t b/extensions/libxt_CT.t
new file mode 100644 (file)
index 0000000..3c28534
--- /dev/null
@@ -0,0 +1,20 @@
+:PREROUTING,OUTPUT
+*raw
+-j CT --notrack;=;OK
+-j CT --ctevents new,related,destroy,reply,assured,protoinfo,helper,mark;=;OK
+-j CT --expevents new;=;OK
+# ERROR: cannot find: iptables -I PREROUTING -t raw -j CT --zone 0
+# -j CT --zone 0;=;OK
+-j CT --zone 65535;=;OK
+-j CT --zone 65536;;FAIL
+-j CT --zone -1;;FAIL
+# ERROR: should fail: iptables -A PREROUTING -t raw -j CT
+# -j CT;;FAIL
+@nfct timeout add test inet tcp ESTABLISHED 100
+# cannot load: iptables -A PREROUTING -t raw -j CT --timeout test
+# -j CT --timeout test;=;OK
+@nfct timeout del test
+@nfct helper add rpc inet tcp
+# cannot load: iptables -A PREROUTING -t raw -j CT --helper rpc
+# -j CT --helper rpc;=;OK
+@nfct helper del rpc