[netfilter-cvslog] r3490 - trunk/nfsim-testsuite/03NAT

rusty at netfilter.org rusty at netfilter.org
Wed Dec 22 05:56:18 CET 2004


Author: rusty at netfilter.org
Date: 2004-12-22 05:56:18 +0100 (Wed, 22 Dec 2004)
New Revision: 3490

Added:
   trunk/nfsim-testsuite/03NAT/05dnat_reply-local.sim
Modified:
   trunk/nfsim-testsuite/03NAT/05dnat_reply.sim
Log:
Add expected failures (I changed behaviour of local NAT in my tree) to separate test.


Added: trunk/nfsim-testsuite/03NAT/05dnat_reply-local.sim
===================================================================
--- trunk/nfsim-testsuite/03NAT/05dnat_reply-local.sim	2004-12-22 04:53:08 UTC (rev 3489)
+++ trunk/nfsim-testsuite/03NAT/05dnat_reply-local.sim	2004-12-22 04:56:18 UTC (rev 3490)
@@ -0,0 +1,29 @@
+# Test NAT mapping of replies for locally-generated packets.
+# XFAIL:linux:*
+
+iptables -t nat -A OUTPUT -d 192.168.1.2 -j DNAT --to-dest 192.168.1.3
+
+# ICMP, UDP, TCP and unknown
+expect gen_ip send:eth1 {IPv4 192.168.0.1 192.168.1.3 0 1 8 0 55 57}
+gen_ip 192.168.0.1 192.168.1.2 0 1 8 0 55 57
+expect gen_ip send:eth1 {IPv4 192.168.0.1 192.168.1.3 0 17 53 53}
+gen_ip 192.168.0.1 192.168.1.2 0 17 53 53 
+expect gen_ip send:eth1 {IPv4 192.168.0.1 192.168.1.3 0 6 1024 8080 SYN SEQ=1000 WIN=512}
+gen_ip 192.168.0.1 192.168.1.2 0 6 1024 8080 SYN SEQ=1000 WIN=512
+expect gen_ip send:eth1 {IPv4 192.168.0.1 192.168.1.3 0 2}
+gen_ip 192.168.0.1 192.168.1.2 0 2
+
+iptables -t nat -D OUTPUT -d 192.168.1.2 -j DNAT --to-dest 192.168.1.3
+
+# Send four replies: should be mirrored back.
+expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 1 0 0 55 57}
+gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 1 0 0 55 57
+
+expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 17 53 53}
+gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 17 53 53
+
+expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
+gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512
+
+expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 2}
+gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 2

Modified: trunk/nfsim-testsuite/03NAT/05dnat_reply.sim
===================================================================
--- trunk/nfsim-testsuite/03NAT/05dnat_reply.sim	2004-12-22 04:53:08 UTC (rev 3489)
+++ trunk/nfsim-testsuite/03NAT/05dnat_reply.sim	2004-12-22 04:56:18 UTC (rev 3490)
@@ -1,13 +1,17 @@
 #! /bin/sh
 
-# XFAIL:linux:*
+# Test NAT mapping of replies.
 
 iptables -t nat -A PREROUTING -s 192.168.0.0/24 -d 192.168.1.2 -j DNAT --to-dest 192.168.1.3
 
 # ICMP, UDP, TCP and unknown
+expect gen_ip send:eth1 {IPv4 192.168.0.2 192.168.1.3 0 1 8 0 55 57}
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 1 8 0 55 57
+expect gen_ip send:eth1 {IPv4 192.168.0.2 192.168.1.3 0 17 53 53}
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 17 53 53 
+expect gen_ip send:eth1 {IPv4 192.168.0.2 192.168.1.3 0 6 1024 8080 SYN SEQ=1000 WIN=512}
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 6 1024 8080 SYN SEQ=1000 WIN=512
+expect gen_ip send:eth1 {IPv4 192.168.0.2 192.168.1.3 0 2}
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 2
 
 iptables -t nat -D PREROUTING -s 192.168.0.0/24 -d 192.168.1.2 -j DNAT --to-dest 192.168.1.3
@@ -24,25 +28,3 @@
 
 expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 2}
 gen_ip IF=eth1 192.168.1.3 192.168.0.2 0 2
-
-# OUTPUT replies should work.
-iptables -t nat -A OUTPUT -d 192.168.1.2 -j DNAT --to-dest 192.168.1.3
-
-gen_ip 192.168.0.1 192.168.1.2 0 1 8 0 55 57
-gen_ip 192.168.0.1 192.168.1.2 0 17 53 53 
-gen_ip 192.168.0.1 192.168.1.2 0 6 1024 8080 SYN SEQ=1000 WIN=512
-gen_ip 192.168.0.1 192.168.1.2 0 2
-
-iptables -t nat -D OUTPUT -d 192.168.1.2 -j DNAT --to-dest 192.168.1.3
-
-expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 1 0 0 55 57}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 1 0 0 55 57
-
-expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 17 53 53}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 17 53 53
-
-expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512
-
-expect gen_ip send:LOCAL {IPv4 192.168.1.2 192.168.0.1 0 2}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 0 2




More information about the netfilter-cvslog mailing list