summaryrefslogtreecommitdiffstats
path: root/tests/nfct/run-test.sh
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-05-26 15:46:52 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2012-05-26 15:47:21 +0200
commit5b6f524eea1ea8d2f0ecb2e17abfba7df708732f (patch)
tree5bb4a141504dcf559a11c4039551e87cd124acee /tests/nfct/run-test.sh
parentd2e942c76f87ea061d5e8643007f1d4c3ed39694 (diff)
tests: add nfct tests for cttimeout
This patch adds the automated tests for the cttimeout infrastructure. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nfct/run-test.sh')
-rw-r--r--tests/nfct/run-test.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/nfct/run-test.sh b/tests/nfct/run-test.sh
new file mode 100644
index 0000000..9bcad0d
--- /dev/null
+++ b/tests/nfct/run-test.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+UID=`id -u`
+if [ $UID -ne 0 ]
+then
+ echo "Run this test as root"
+ exit 1
+fi
+
+gcc test.c -o test
+#
+# XXX: module auto-load not support by nfnetlink_cttimeout yet :-(
+#
+modprobe nf_conntrack_ipv4
+modprobe nf_conntrack_ipv6
+modprobe nf_conntrack_proto_udplite
+modprobe nf_conntrack_proto_sctp
+modprobe nf_conntrack_proto_dccp
+modprobe nf_conntrack_proto_gre
+./test timeout