[netfilter-cvslog] r3512 - trunk/nfsim-testsuite/01iptables

rusty at netfilter.org rusty at netfilter.org
Wed Dec 29 12:46:04 CET 2004


Author: rusty at netfilter.org
Date: 2004-12-29 12:46:03 +0100 (Wed, 29 Dec 2004)
New Revision: 3512

Added:
   trunk/nfsim-testsuite/01iptables/20ipt_MARK-v1.sim
Modified:
   trunk/nfsim-testsuite/01iptables/20ipt_MARK.sim
Log:
Move MARK extensions test out to separate test case.
Add "delete with wrong target data should fail" test.


Added: trunk/nfsim-testsuite/01iptables/20ipt_MARK-v1.sim
===================================================================
--- trunk/nfsim-testsuite/01iptables/20ipt_MARK-v1.sim	2004-12-29 11:45:04 UTC (rev 3511)
+++ trunk/nfsim-testsuite/01iptables/20ipt_MARK-v1.sim	2004-12-29 11:46:03 UTC (rev 3512)
@@ -0,0 +1,60 @@
+# Test the ipt_MARK target v1 options.
+# Not merged in kernel or iptables yet, fails on everything:
+# XFAIL:iptables:*
+# XFAIL:linux:*
+
+# Test new-style, insert and delete.
+iptables -t mangle -A PREROUTING -j MARK --or-mark 7
+iptables -t mangle -D PREROUTING -j MARK --or-mark 7
+
+iptables -t mangle -A PREROUTING -j MARK --and-mark 7
+iptables -t mangle -D PREROUTING -j MARK --and-mark 7
+
+iptables -t mangle -A PREROUTING -s 192.160.0.2 -j MARK --or-mark 7
+iptables -t mangle -D PREROUTING -s 192.160.0.2 -j MARK --or-mark 7
+
+iptables -t mangle -A PREROUTING -s 192.160.0.2 -j MARK --and-mark 7
+iptables -t mangle -D PREROUTING -s 192.160.0.2 -j MARK --and-mark 7
+
+# Test that they work.
+iptables -t mangle -A PREROUTING -j MARK --or-mark 7
+expect gen_ip send:eth1 MARK 7 {IPv4 192.168.0.2 192.168.1.2 10 17 1 2}
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
+iptables -t mangle -D PREROUTING -j MARK --or-mark 7
+
+iptables -t mangle -A PREROUTING -j MARK --set-mark 3
+iptables -t mangle -A PREROUTING -j MARK --or-mark 4
+expect gen_ip send:eth1 MARK 7 {IPv4 192.168.0.2 192.168.1.2 10 17 1 2}
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
+iptables -t mangle -D PREROUTING -j MARK --set-mark 3
+iptables -t mangle -D PREROUTING -j MARK --or-mark 4
+
+iptables -t mangle -A PREROUTING -j MARK --set-mark 3
+iptables -t mangle -A PREROUTING -j MARK --and-mark 6
+expect gen_ip send:eth1 MARK 2 {IPv4 192.168.0.2 192.168.1.2 10 17 1 2}
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
+iptables -t mangle -D PREROUTING -j MARK --set-mark 3
+iptables -t mangle -D PREROUTING -j MARK --and-mark 6
+
+# Now mix them up: check we delete the right one.
+iptables -t mangle -A PREROUTING -j MARK --set-mark 7
+iptables -t mangle -A PREROUTING -j MARK --or-mark 7
+iptables -t mangle -A PREROUTING -j MARK --and-mark 7
+
+# Delete old-style.
+iptables -t mangle -D PREROUTING -j MARK --set-mark 7
+expect iptables iptables: command failed
+iptables -t mangle -D PREROUTING -j MARK --set-mark 7
+iptables -t mangle -A PREROUTING -j MARK --set-mark 7
+
+# Delete or.
+iptables -t mangle -D PREROUTING -j MARK --or-mark 7
+expect iptables iptables: command failed
+iptables -t mangle -D PREROUTING -j MARK --or-mark 7
+iptables -t mangle -A PREROUTING -j MARK --or-mark 7
+
+# Delete and.
+iptables -t mangle -D PREROUTING -j MARK --and-mark 7
+expect iptables iptables: command failed
+iptables -t mangle -D PREROUTING -j MARK --and-mark 7
+iptables -t mangle -A PREROUTING -j MARK --and-mark 7

Modified: trunk/nfsim-testsuite/01iptables/20ipt_MARK.sim
===================================================================
--- trunk/nfsim-testsuite/01iptables/20ipt_MARK.sim	2004-12-29 11:45:04 UTC (rev 3511)
+++ trunk/nfsim-testsuite/01iptables/20ipt_MARK.sim	2004-12-29 11:46:03 UTC (rev 3512)
@@ -1,12 +1,14 @@
-# Test the ipt_MARK target, which has a backwards compatbility mode.
-# Not merged in kernel yet, fails on everything:
-#	XFAIL:linux:*
+# Test the ipt_MARK target
 
 # Test old-style first, insert and delete.
 iptables -t mangle -A PREROUTING -j MARK --set-mark 7
+expect iptables iptables: command failed
+iptables -t mangle -D PREROUTING -j MARK --set-mark 8
 iptables -t mangle -D PREROUTING -j MARK --set-mark 7
 
 iptables -t mangle -A PREROUTING -s 192.160.0.2 -j MARK --set-mark 7
+expect iptables iptables: command failed
+iptables -t mangle -D PREROUTING -s 192.160.0.2 -j MARK --set-mark 8
 iptables -t mangle -D PREROUTING -s 192.160.0.2 -j MARK --set-mark 7
 
 # Test that it works.
@@ -15,62 +17,6 @@
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
 iptables -t mangle -D PREROUTING -j MARK --set-mark 7
 
-# Test new-style, insert and delete.
-iptables -t mangle -A PREROUTING -j MARK --or-mark 7
-iptables -t mangle -D PREROUTING -j MARK --or-mark 7
-
-iptables -t mangle -A PREROUTING -j MARK --and-mark 7
-iptables -t mangle -D PREROUTING -j MARK --and-mark 7
-
-iptables -t mangle -A PREROUTING -s 192.160.0.2 -j MARK --or-mark 7
-iptables -t mangle -D PREROUTING -s 192.160.0.2 -j MARK --or-mark 7
-
-iptables -t mangle -A PREROUTING -s 192.160.0.2 -j MARK --and-mark 7
-iptables -t mangle -D PREROUTING -s 192.160.0.2 -j MARK --and-mark 7
-
-# Test that they work.
-iptables -t mangle -A PREROUTING -j MARK --or-mark 7
-expect gen_ip send:eth1 MARK 7 {IPv4 192.168.0.2 192.168.1.2 10 17 1 2}
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
-iptables -t mangle -D PREROUTING -j MARK --or-mark 7
-
-iptables -t mangle -A PREROUTING -j MARK --set-mark 3
-iptables -t mangle -A PREROUTING -j MARK --or-mark 4
-expect gen_ip send:eth1 MARK 7 {IPv4 192.168.0.2 192.168.1.2 10 17 1 2}
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
-iptables -t mangle -D PREROUTING -j MARK --set-mark 3
-iptables -t mangle -D PREROUTING -j MARK --or-mark 4
-
-iptables -t mangle -A PREROUTING -j MARK --set-mark 3
-iptables -t mangle -A PREROUTING -j MARK --and-mark 6
-expect gen_ip send:eth1 MARK 2 {IPv4 192.168.0.2 192.168.1.2 10 17 1 2}
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 10 17 1 2
-iptables -t mangle -D PREROUTING -j MARK --set-mark 3
-iptables -t mangle -D PREROUTING -j MARK --and-mark 6
-
-# Now mix them up: check we delete the right one.
-iptables -t mangle -A PREROUTING -j MARK --set-mark 7
-iptables -t mangle -A PREROUTING -j MARK --or-mark 7
-iptables -t mangle -A PREROUTING -j MARK --and-mark 7
-
-# Delete old-style.
-iptables -t mangle -D PREROUTING -j MARK --set-mark 7
-expect iptables iptables: command failed
-iptables -t mangle -D PREROUTING -j MARK --set-mark 7
-iptables -t mangle -A PREROUTING -j MARK --set-mark 7
-
-# Delete or.
-iptables -t mangle -D PREROUTING -j MARK --or-mark 7
-expect iptables iptables: command failed
-iptables -t mangle -D PREROUTING -j MARK --or-mark 7
-iptables -t mangle -A PREROUTING -j MARK --or-mark 7
-
-# Delete and.
-iptables -t mangle -D PREROUTING -j MARK --and-mark 7
-expect iptables iptables: command failed
-iptables -t mangle -D PREROUTING -j MARK --and-mark 7
-iptables -t mangle -A PREROUTING -j MARK --and-mark 7
-
 # Other tables than mangle should fail
 expect iptables iptables: command failed
 iptables -t filter -A FORWARD -j MARK --set-mark 7




More information about the netfilter-cvslog mailing list