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

rusty at netfilter.org rusty at netfilter.org
Sun Jan 2 10:26:34 CET 2005


Author: rusty at netfilter.org
Date: 2005-01-02 10:26:33 +0100 (Sun, 02 Jan 2005)
New Revision: 3542

Added:
   trunk/nfsim-testsuite/01iptables/22ipt_dscp.sim
Log:
Nicolas Bouliane:
	This is the testsuite related with the patchs I sent to you about the 
	dscp implementation into nfsim.


Added: trunk/nfsim-testsuite/01iptables/22ipt_dscp.sim
===================================================================
--- trunk/nfsim-testsuite/01iptables/22ipt_dscp.sim	2005-01-02 08:09:16 UTC (rev 3541)
+++ trunk/nfsim-testsuite/01iptables/22ipt_dscp.sim	2005-01-02 09:26:33 UTC (rev 3542)
@@ -0,0 +1,29 @@
+# Input outbound value to DSCP.
+expect iptables iptables: command failed
+iptables -A INPUT -m dscp --dscp 64
+
+# Check if inputing the same option twice overwrite previous one.
+expect iptables iptables: command failed
+iptables -A INPUT -m dscp --dscp 1 --dscp 2
+
+expect iptables iptables: command failed
+iptables -A INPUT -m dscp --dscp-class BE --dscp-class EF
+
+# Test for match function.
+# --dscp
+iptables -A INPUT -m dscp --dscp 0x01 -j DROP
+expect gen_ip hook:NF_IP_LOCAL_IN iptable_filter NF_DROP {IPv4 DSCP=0x1 192.168.0.2 192.168.0.1 0 6 1 2 ACK}
+gen_ip IF=eth0 DSCP=0x1 192.168.0.2 192.168.0.1 0 TCP 1 2 ACK
+
+expect gen_ip send:LOCAL {IPv4 DSCP=0x2 192.168.0.2 192.168.0.1 0 6 1 2 ACK}
+gen_ip IF=eth0 DSCP=0x2 192.168.0.2 192.168.0.1 0 TCP 1 2 ACK
+iptables -D INPUT -m dscp --dscp 0x01 -j DROP
+
+# --dscp-class
+iptables -A INPUT -m dscp --dscp-class EF -j DROP
+expect gen_ip hook:NF_IP_LOCAL_IN iptable_filter NF_DROP {IPv4 DSCP=0x2e 192.168.0.2 192.168.0.1 0 6 1 2 ACK}
+gen_ip IF=eth0 DSCP=0x2e 192.168.0.2 192.168.0.1 0 TCP 1 2 ACK
+
+expect gen_ip send:LOCAL {IPv4 DSCP=0x2f 192.168.0.2 192.168.0.1 0 6 1 2 ACK}
+gen_ip IF=eth0 DSCP=0x2f 192.168.0.2 192.168.0.1 0 TCP 1 2 ACK
+iptables -D INPUT -m dscp --dscp-class EF -j DROP




More information about the netfilter-cvslog mailing list