summaryrefslogtreecommitdiffstats
path: root/tests/py/ip
diff options
context:
space:
mode:
authorPablo M. Bermudo Garay <pablombg@gmail.com>2016-01-12 01:26:57 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-01-12 14:36:51 +0100
commit5fb625af9e89db915451992d8920b4fa353a1185 (patch)
tree2eb8f4436e565dee854991908b86cfdb0dc9ecb5 /tests/py/ip
parentf8ce80a1b3a6e54147c80a3e1fe00558ece1e031 (diff)
tests/py: update test files syntax
The test files have been adapted to the syntax defined in the previous commit "tests/py: modify supported test file syntax" Signed-off-by: Pablo M. Bermudo Garay <pablombg@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/ip')
-rw-r--r--tests/py/ip/chains.t4
-rw-r--r--tests/py/ip/ct.t4
-rw-r--r--tests/py/ip/dnat.t3
-rw-r--r--tests/py/ip/dup.t3
-rw-r--r--tests/py/ip/ether.t4
-rw-r--r--tests/py/ip/icmp.t3
-rw-r--r--tests/py/ip/ip.t5
-rw-r--r--tests/py/ip/masquerade.t3
-rw-r--r--tests/py/ip/redirect.t3
-rw-r--r--tests/py/ip/reject.t3
-rw-r--r--tests/py/ip/sets.t5
-rw-r--r--tests/py/ip/snat.t3
12 files changed, 26 insertions, 17 deletions
diff --git a/tests/py/ip/chains.t b/tests/py/ip/chains.t
index 8edf62b5..fc3745e5 100644
--- a/tests/py/ip/chains.t
+++ b/tests/py/ip/chains.t
@@ -1,5 +1,3 @@
-*ip;test-ip4
-
# filter chains available are: input, output, forward, prerouting, postrouting
:filter-input;type filter hook input priority 0
:filter-pre;type filter hook prerouting priority 0
@@ -13,3 +11,5 @@
:nat-post-t;type nat hook postrouting priority 0
# route chain available are: output
:route-out-t;type route hook output priority 0
+
+*ip;test-ip4;filter-input,filter-pre,filter-forw,filter-out,filter-post,nat-input-t,nat-pre-t,nat-out-t,nat-post-t,route-out-t
diff --git a/tests/py/ip/ct.t b/tests/py/ip/ct.t
index 28ad7660..8ec340d3 100644
--- a/tests/py/ip/ct.t
+++ b/tests/py/ip/ct.t
@@ -1,7 +1,7 @@
-*ip;test-ip4
-
:output;type filter hook output priority 0
+*ip;test-ip4;output
+
ct saddr original 192.168.0.1;ok
ct saddr reply 192.168.0.1;ok
ct daddr original 192.168.0.1;ok
diff --git a/tests/py/ip/dnat.t b/tests/py/ip/dnat.t
index cdb78116..28e658d3 100644
--- a/tests/py/ip/dnat.t
+++ b/tests/py/ip/dnat.t
@@ -1,6 +1,7 @@
-*ip;test-ip4
:prerouting;type nat hook prerouting priority 0
+*ip;test-ip4;prerouting
+
iifname "eth0" tcp dport 80-90 dnat 192.168.3.2;ok
iifname "eth0" tcp dport != 80-90 dnat 192.168.3.2;ok
iifname "eth0" tcp dport {80, 90, 23} dnat 192.168.3.2;ok
diff --git a/tests/py/ip/dup.t b/tests/py/ip/dup.t
index 9320d546..ac4e83a2 100644
--- a/tests/py/ip/dup.t
+++ b/tests/py/ip/dup.t
@@ -1,6 +1,7 @@
-*ip;test-ip4
:input;type filter hook input priority 0
+*ip;test-ip4;input
+
dup to 192.168.2.1;ok
dup to 192.168.2.1 device eth0;ok
dup to ip saddr map { 192.168.2.120 : 192.168.2.1 } device eth0;ok
diff --git a/tests/py/ip/ether.t b/tests/py/ip/ether.t
index 4d30f51c..e1d302c7 100644
--- a/tests/py/ip/ether.t
+++ b/tests/py/ip/ether.t
@@ -1,7 +1,7 @@
-*ip;test-ip
-
:input;type filter hook input priority 0
+*ip;test-ip;input
+
tcp dport 22 iiftype ether ip daddr 1.2.3.4 ether saddr 00:0f:54:0c:11:4 accept;ok;tcp dport 22 ip daddr 1.2.3.4 ether saddr 00:0f:54:0c:11:04 accept
tcp dport 22 ip daddr 1.2.3.4 ether saddr 00:0f:54:0c:11:04;ok
tcp dport 22 ether saddr 00:0f:54:0c:11:04 ip daddr 1.2.3.4;ok
diff --git a/tests/py/ip/icmp.t b/tests/py/ip/icmp.t
index bd00f5ca..02027b0a 100644
--- a/tests/py/ip/icmp.t
+++ b/tests/py/ip/icmp.t
@@ -1,8 +1,9 @@
-*ip;test-ip4
# BUG: There is a bug with icmp protocol and inet family.
# *inet;test-inet
:input;type filter hook input priority 0
+*ip;test-ip4;input
+
icmp type echo-reply accept;ok
icmp type destination-unreachable accept;ok
icmp type source-quench accept;ok
diff --git a/tests/py/ip/ip.t b/tests/py/ip/ip.t
index 0339c2ac..152323b9 100644
--- a/tests/py/ip/ip.t
+++ b/tests/py/ip/ip.t
@@ -1,7 +1,8 @@
-*ip;test-ip4
-*inet;test-inet
:input;type filter hook input priority 0
+*ip;test-ip4;input
+*inet;test-inet;input
+
- ip version 2;ok
# bug ip hdrlength
diff --git a/tests/py/ip/masquerade.t b/tests/py/ip/masquerade.t
index 35001f37..0bb49a68 100644
--- a/tests/py/ip/masquerade.t
+++ b/tests/py/ip/masquerade.t
@@ -1,6 +1,7 @@
-*ip;test-ip4
:postrouting;type nat hook postrouting priority 0
+*ip;test-ip4;postrouting
+
# nf_nat flags combination
udp dport 53 masquerade;ok
udp dport 53 masquerade random;ok
diff --git a/tests/py/ip/redirect.t b/tests/py/ip/redirect.t
index b7eecb74..8161ae6d 100644
--- a/tests/py/ip/redirect.t
+++ b/tests/py/ip/redirect.t
@@ -1,6 +1,7 @@
-*ip;test-ip4
:output;type nat hook output priority 0
+*ip;test-ip4;output
+
# without arguments
udp dport 53 redirect;ok
diff --git a/tests/py/ip/reject.t b/tests/py/ip/reject.t
index 70a63a0b..6006f054 100644
--- a/tests/py/ip/reject.t
+++ b/tests/py/ip/reject.t
@@ -1,6 +1,7 @@
-*ip;test-ip4
:output;type filter hook output priority 0
+*ip;test-ip4;output
+
reject;ok
reject with icmp type host-unreachable;ok
reject with icmp type net-unreachable;ok
diff --git a/tests/py/ip/sets.t b/tests/py/ip/sets.t
index c199dbd2..d4a72ade 100644
--- a/tests/py/ip/sets.t
+++ b/tests/py/ip/sets.t
@@ -1,7 +1,8 @@
-*ip;test-ip4
-*inet;test-inet
:input;type filter hook input priority 0
+*ip;test-ip4;input
+*inet;test-inet;input
+
!set_ipv4_add ipv4_addr;ok
!set_inet inet_proto;ok
!set_inet_serv inet_service;ok
diff --git a/tests/py/ip/snat.t b/tests/py/ip/snat.t
index 1caf7c76..a8469a35 100644
--- a/tests/py/ip/snat.t
+++ b/tests/py/ip/snat.t
@@ -1,6 +1,7 @@
-*ip;test-ip4
:postrouting;type nat hook postrouting priority 0
+*ip;test-ip4;postrouting
+
iifname "eth0" tcp dport 80-90 snat 192.168.3.2;ok
iifname "eth0" tcp dport != 80-90 snat 192.168.3.2;ok
iifname "eth0" tcp dport {80, 90, 23} snat 192.168.3.2;ok