summaryrefslogtreecommitdiffstats
path: root/extensions/libipt_ttl.t
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-10-01 10:44:49 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-10-01 10:44:58 +0200
commita9084baa5d0ff6ccd28715b79ad2630bc77be49b (patch)
tree5f53bda6e82184773150e29339a425578c4db644 /extensions/libipt_ttl.t
parentcbe036db892c298c33e77dec2c5129dbb4dccc2c (diff)
parent4b187eeed49dc507d38438affabe90d36847412d (diff)
Merge branch 'tests'
This merges the iptables-test.py script and the corresponding test files.
Diffstat (limited to 'extensions/libipt_ttl.t')
-rw-r--r--extensions/libipt_ttl.t15
1 files changed, 15 insertions, 0 deletions
diff --git a/extensions/libipt_ttl.t b/extensions/libipt_ttl.t
new file mode 100644
index 00000000..ebe5b3a2
--- /dev/null
+++ b/extensions/libipt_ttl.t
@@ -0,0 +1,15 @@
+:INPUT,FORWARD,OUTPUT
+-m ttl --ttl-eq 0;=;OK
+-m ttl --ttl-eq 255;=;OK
+-m ttl ! --ttl-eq 0;=;OK
+-m ttl ! --ttl-eq 255;=;OK
+-m ttl --ttl-gt 0;=;OK
+# not possible have anything greater than 255, TTL is 8-bit long
+# ERROR: should fail: iptables -A INPUT -m ttl --ttl-gt 255
+## -m ttl --ttl-gt 255;;FAIL
+# not possible have anything below 0
+# ERROR: should fail: iptables -A INPUT -m ttl --ttl-lt 0
+## -m ttl --ttl-lt 0;;FAIL
+-m ttl --ttl-eq 256;;FAIL
+-m ttl --ttl-eq -1;;FAIL
+-m ttl;;FAIL