path: root/extensions
diff options
authorPablo Neira Ayuso <>2012-09-26 17:36:55 +0200
committerPablo Neira Ayuso <>2013-10-07 16:35:49 +0200
commite80fe60adcb65b756f760922441cac3b7d232593 (patch)
tree37247401f7435fcb21a427f0749b8da7d163d74f /extensions
parentd65a6917974ef4e5107ae696c9872096c309864d (diff)
extensions: libxt_conntrack: add unit test
Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'extensions')
1 files changed, 27 insertions, 0 deletions
diff --git a/extensions/libxt_conntrack.t b/extensions/libxt_conntrack.t
new file mode 100644
index 00000000..db531475
--- /dev/null
+++ b/extensions/libxt_conntrack.t
@@ -0,0 +1,27 @@
+-m conntrack --ctstate NEW;=;OK
+-m conntrack --ctstate NEW,ESTABLISHED;=;OK
+-m conntrack --ctstate NEW,RELATED,ESTABLISHED;=;OK
+-m conntrack --ctstate INVALID;=;OK
+-m conntrack --ctstate UNTRACKED;=;OK
+-m conntrack --ctstate SNAT,DNAT;=;OK
+-m conntrack --ctstate wrong;;FAIL
+# should we convert this to output "tcp" instead of 6?
+-m conntrack --ctproto tcp;-m conntrack --ctproto 6;OK
+-m conntrack --ctorigsrc;=;OK
+-m conntrack --ctorigdst;=;OK
+-m conntrack --ctreplsrc;=;OK
+-m conntrack --ctrepldst;=;OK
+-m conntrack --ctexpire 0;=;OK
+-m conntrack --ctexpire 4294967295;=;OK
+-m conntrack --ctexpire 0:4294967295;=;OK
+-m conntrack --ctexpire 42949672956;;FAIL
+-m conntrack --ctexpire -1;;FAIL
+-m conntrack --ctdir ORIGINAL;=;OK
+-m conntrack --ctdir REPLY;=;OK
+-m conntrack --ctstatus NONE;=;OK
+-m conntrack --ctstatus CONFIRMED;=;OK
+-m conntrack --ctstatus ASSURED;=;OK
+-m conntrack --ctstatus EXPECTED;=;OK
+-m conntrack --ctstatus SEEN_REPLY;=;OK
+-m conntrack;;FAIL