[netfilter-cvslog] r3276 - in trunk/nfsim-testsuite: 02conntrack 03NAT

rusty at netfilter.org rusty at netfilter.org
Thu Nov 11 04:50:20 CET 2004


Author: rusty at netfilter.org
Date: 2004-11-11 04:50:19 +0100 (Thu, 11 Nov 2004)
New Revision: 3276

Modified:
   trunk/nfsim-testsuite/02conntrack/00setup.sim
   trunk/nfsim-testsuite/02conntrack/01reply.sim
   trunk/nfsim-testsuite/02conntrack/02timeout.sim
   trunk/nfsim-testsuite/03NAT/02simple_error.sh
   trunk/nfsim-testsuite/03NAT/03ip_dnat.sim
   trunk/nfsim-testsuite/03NAT/05dnat_reply.sim
   trunk/nfsim-testsuite/03NAT/06ip_snat_reply.sim
Log:
No longer need to escape [ and ].
Fix up TCP SYNs to have no data for window tracking code in recent kernels.



Modified: trunk/nfsim-testsuite/02conntrack/00setup.sim
===================================================================
--- trunk/nfsim-testsuite/02conntrack/00setup.sim	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/02conntrack/00setup.sim	2004-11-11 03:50:19 UTC (rev 3276)
@@ -1,10 +1,10 @@
 # packet to local interface, new connection
 gen_ip IF=eth0 192.168.0.2 192.168.0.1 50 udp 1 2
 
-expect proc udp 17 30 src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 \[UNREPLIED\] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
+expect proc udp 17 30 src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 [UNREPLIED] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
 proc cat /proc/net/ip_conntrack
 
 # packet to other interface, new connection.
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 50 udp 5 6
-expect proc udp 17 30 src=192.168.0.2 dst=192.168.1.2 sport=5 dport=6 \[UNREPLIED\] src=192.168.1.2 dst=192.168.0.2 sport=6 dport=5 use=1 
+expect proc udp 17 30 src=192.168.0.2 dst=192.168.1.2 sport=5 dport=6 [UNREPLIED] src=192.168.1.2 dst=192.168.0.2 sport=6 dport=5 use=1 
 proc cat /proc/net/ip_conntrack

Modified: trunk/nfsim-testsuite/02conntrack/01reply.sim
===================================================================
--- trunk/nfsim-testsuite/02conntrack/01reply.sim	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/02conntrack/01reply.sim	2004-11-11 03:50:19 UTC (rev 3276)
@@ -1,7 +1,7 @@
 # Setup
 gen_ip IF=eth0 192.168.0.2 192.168.0.1 50 udp 1 2
 
-expect proc udp      17 30 src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 \[UNREPLIED\] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
+expect proc udp      17 30 src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 [UNREPLIED] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
 proc cat /proc/net/ip_conntrack
 
 # Reply to previous connection

Modified: trunk/nfsim-testsuite/02conntrack/02timeout.sim
===================================================================
--- trunk/nfsim-testsuite/02conntrack/02timeout.sim	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/02conntrack/02timeout.sim	2004-11-11 03:50:19 UTC (rev 3276)
@@ -4,10 +4,10 @@
 gen_ip IF=eth0 192.168.0.2 192.168.0.1 50 icmp 8 2 100 200
 gen_ip IF=eth0 192.168.0.2 192.168.0.1 50 59
 
-expect proc udp      17 30 src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 \[UNREPLIED\] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
-expect proc tcp      6 120 SYN_SENT src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 \[UNREPLIED\] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
-expect proc icmp     1 30 src=192.168.0.2 dst=192.168.0.1 type=8 code=2 id=100 \[UNREPLIED\] src=192.168.0.1 dst=192.168.0.2 type=0 code=2 id=100 use=1 
-expect proc unknown  59 600 src=192.168.0.2 dst=192.168.0.1 \[UNREPLIED\] src=192.168.0.1 dst=192.168.0.2 use=1 
+expect proc udp      17 30 src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 [UNREPLIED] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
+expect proc tcp      6 120 SYN_SENT src=192.168.0.2 dst=192.168.0.1 sport=1 dport=2 [UNREPLIED] src=192.168.0.1 dst=192.168.0.2 sport=2 dport=1 use=1 
+expect proc icmp     1 30 src=192.168.0.2 dst=192.168.0.1 type=8 code=2 id=100 [UNREPLIED] src=192.168.0.1 dst=192.168.0.2 type=0 code=2 id=100 use=1 
+expect proc unknown  59 600 src=192.168.0.2 dst=192.168.0.1 [UNREPLIED] src=192.168.0.1 dst=192.168.0.2 use=1 
 
 proc cat /proc/net/ip_conntrack
 

Modified: trunk/nfsim-testsuite/03NAT/02simple_error.sh
===================================================================
--- trunk/nfsim-testsuite/03NAT/02simple_error.sh	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/03NAT/02simple_error.sh	2004-11-11 03:50:19 UTC (rev 3276)
@@ -16,6 +16,8 @@
 		echo expect gen_err send:eth1 {IPv4 192.168.0.5 192.168.1.$src 28 1 2 0 CONTAINS 192.168.1.$src 192.168.0.$dst 100 17 $sp $dp -TRUNCATED-}
 		echo gen_err IF=eth0 192.168.0.5 2 0 192.168.1.$src 192.168.0.$dst 100 17 $sp $dp
 	    done
+	    # If we don't forward time, conntrack table can fill
+	    echo time infinity
         done
     done
 done > $TMPFILE

Modified: trunk/nfsim-testsuite/03NAT/03ip_dnat.sim
===================================================================
--- trunk/nfsim-testsuite/03NAT/03ip_dnat.sim	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/03NAT/03ip_dnat.sim	2004-11-11 03:50:19 UTC (rev 3276)
@@ -4,7 +4,7 @@
 expect gen_ip send:eth1 {IPv4 192.168.0.2 192.168.1.3 100 1 8 0 55 57}
 gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 1 8 0 55 57
 
-expect iptables 1 128 DNAT icmp -- * * 0.0.0.0/0 0.0.0.0/0 to:192.168.1.3
+expect iptables 1 128 DNAT icmp -- * * 0.0.0.0/0 0.0.0.0/0 to:192.168.1.3 
 iptables -t nat -L PREROUTING -v -n
 
 # And locally-generated packets don't DNAT.

Modified: trunk/nfsim-testsuite/03NAT/05dnat_reply.sim
===================================================================
--- trunk/nfsim-testsuite/03NAT/05dnat_reply.sim	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/03NAT/05dnat_reply.sim	2004-11-11 03:50:19 UTC (rev 3276)
@@ -3,44 +3,44 @@
 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
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 1 8 0 55 57
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 17 53 53 
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 6 1024 8080 SYN SEQ=1000 WIN=512
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 2
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 1 8 0 55 57
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 17 53 53 
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 6 1024 8080 SYN SEQ=1000 WIN=512
+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
 
 # Send four replies: should be mirrored back.
-expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 100 1 0 0 55 57}
-gen_ip IF=eth1 192.168.1.3 192.168.0.2 100 1 0 0 55 57
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 1 0 0 55 57}
+gen_ip IF=eth1 192.168.1.3 192.168.0.2 0 1 0 0 55 57
 
-expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 100 17 53 53}
-gen_ip IF=eth1 192.168.1.3 192.168.0.2 100 17 53 53
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 17 53 53}
+gen_ip IF=eth1 192.168.1.3 192.168.0.2 0 17 53 53
 
-expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 100 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
-gen_ip IF=eth1 192.168.1.3 192.168.0.2 100 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
+gen_ip IF=eth1 192.168.1.3 192.168.0.2 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512
 
-expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 100 2}
-gen_ip IF=eth1 192.168.1.3 192.168.0.2 100 2
+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 100 1 8 0 55 57
-gen_ip 192.168.0.1 192.168.1.2 100 17 53 53 
-gen_ip 192.168.0.1 192.168.1.2 100 6 1024 8080 SYN SEQ=1000 WIN=512
-gen_ip 192.168.0.1 192.168.1.2 100 2
+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:lo {IPv4 192.168.1.2 192.168.0.2 100 1 0 0 55 57}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 100 1 0 0 55 57
+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:lo {IPv4 192.168.1.2 192.168.0.2 100 17 53 53}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 100 17 53 53
+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:lo {IPv4 192.168.1.2 192.168.0.2 100 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
-gen_ip IF=eth1 192.168.1.3 192.168.0.1 100 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 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:eth0 {IPv4 192.168.1.2 192.168.0.2 100 2}
-gen_ip IF=eth1 192.168.1.3 192.168.0.2 100 2
+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/06ip_snat_reply.sim
===================================================================
--- trunk/nfsim-testsuite/03NAT/06ip_snat_reply.sim	2004-11-11 03:48:45 UTC (rev 3275)
+++ trunk/nfsim-testsuite/03NAT/06ip_snat_reply.sim	2004-11-11 03:50:19 UTC (rev 3276)
@@ -2,19 +2,19 @@
 iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 192.168.1.2 -j SNAT --to-source 192.168.0.3
 
 # ICMP, UDP, TCP and unknown
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 1 8 0 55 57
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 17 53 53
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 6 1024 8080 SYN SEQ=1000 WIN=512
-gen_ip IF=eth0 192.168.0.2 192.168.1.2 100 2
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 1 8 0 55 57
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 17 53 53
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 6 1024 8080 SYN SEQ=1000 WIN=512
+gen_ip IF=eth0 192.168.0.2 192.168.1.2 0 2
 
 iptables -t nat -D POSTROUTING -s 192.168.0.0/24 -d 192.168.1.2 -j SNAT --to-source 192.168.0.3
 
 # Send four replies: should be mirrored back.
-expect gen_ip send:eth0 {IPV4 192.168.1.2 192.168.0.2 100 1 0 0 55 57}
-gen_ip IF=eth1 192.168.1.2 192.168.0.3 100 1 0 0 55 57
-expect gen_ip send:eth0 {IPV4 192.168.1.2 192.168.0.2 100 17 53 53}
-gen_ip IF=eth1 192.168.1.2 192.168.0.3 100 17 53 53
-expect gen_ip send:eth0 {IPV4 192.168.1.2 192.168.0.2 100 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
-gen_ip IF=eth1 192.168.1.2 192.168.0.3 100 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512
-expect gen_ip send:eth0 {IPV4 192.168.1.2 192.168.0.2 100 2}
-gen_ip IF=eth1 192.168.1.2 192.168.0.3 100 2
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 1 0 0 55 57}
+gen_ip IF=eth1 192.168.1.2 192.168.0.3 0 1 0 0 55 57
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 17 53 53}
+gen_ip IF=eth1 192.168.1.2 192.168.0.3 0 17 53 53
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512}
+gen_ip IF=eth1 192.168.1.2 192.168.0.3 0 6 8080 1024 SYN/ACK SEQ=2000 ACK=1001 WIN=512
+expect gen_ip send:eth0 {IPv4 192.168.1.2 192.168.0.2 0 2}
+gen_ip IF=eth1 192.168.1.2 192.168.0.3 0 2




More information about the netfilter-cvslog mailing list